Commit 5928597c authored by Timothée Giet's avatar Timothée Giet
Browse files

Fix cursors center and add outline_cross cursor mode

Fix the crossair and circle xpm cursors to get a proper center.
Add outline+crosshair cursor mode.
parent 1e8b4fa9
/* XPM */
static char *cursor_cross[] = {
/* columns rows colors chars-per-pixel */
"32 32 3 1",
" c #000000",
". c #FFFFFF",
"X c None",
/* pixels */
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXX...XXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXX. .XXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXX. .XXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXX. .XXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXX. .XXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXX. .XXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXX. .XXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXX. .XXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXX. .XXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXX. .XXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"X..........XXXXXXXXX..........XX",
"X. .XXXXXXX. .XX",
"X..........XXXXXXXXX..........XX",
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXX. .XXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXX. .XXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXX. .XXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXX. .XXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXX. .XXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXX. .XXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXX. .XXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXX. .XXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXX. .XXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXX...XXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
};
static char *dummy[]={
"31 31 3 1",
". c None",
"a c #000000",
"# c #ffffff",
"...............................",
"..............###..............",
"..............#a#..............",
"..............#a#..............",
"..............#a#..............",
"..............#a#..............",
"..............#a#..............",
"..............#a#..............",
"..............#a#..............",
"..............#a#..............",
"..............#a#..............",
"...............#...............",
"...............................",
"...............................",
".##########.........##########.",
".#aaaaaaaaa#.......#aaaaaaaaa#.",
".##########.........##########.",
"...............................",
"...............................",
"...............#...............",
"..............#a#..............",
"..............#a#..............",
"..............#a#..............",
"..............#a#..............",
"..............#a#..............",
"..............#a#..............",
"..............#a#..............",
"..............#a#..............",
"..............#a#..............",
"..............###..............",
"..............................."};
/* XPM */
static char * cursor_cross_xpm[] = {
"32 32 3 1",
" c None",
". c #000000",
"+ c #FFFFFF",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ... ",
" .+++. ",
" .+ +. ",
" .+++. ",
" ... ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};
static char *dummy[]={
"31 31 3 1",
". c None",
"# c #000000",
"a c #ffffff",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"..............###..............",
".............#aaa#.............",
".............#a.a#.............",
".............#aaa#.............",
"..............###..............",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"..............................."};
......@@ -45,7 +45,8 @@ enum enumCursorStyle {
CURSOR_STYLE_OUTLINE = 3,
CURSOR_STYLE_NO_CURSOR = 4,
CURSOR_STYLE_SMALL_ROUND = 5,
CURSOR_STYLE_OUTLINE_CENTER_DOT = 6
CURSOR_STYLE_OUTLINE_CENTER_DOT = 6,
CURSOR_STYLE_OUTLINE_CENTER_CROSS = 7
};
/*
......
......@@ -100,6 +100,7 @@ GeneralTab::GeneralTab(QWidget *_parent, const char *_name)
m_cmbCursorShape->addItem(i18n("No Cursor"));
m_cmbCursorShape->addItem(i18n("Small Circle"));
m_cmbCursorShape->addItem(i18n("Brush Outline with Small Circle"));
m_cmbCursorShape->addItem(i18n("Brush Outline with Crosshair"));
#ifdef NEPOMUK
grpResourceTagging->show();
......
......@@ -726,6 +726,7 @@ void KisTool::resetCursorStyle()
useCursor(d->cursor);
break;
case CURSOR_STYLE_CROSSHAIR:
case CURSOR_STYLE_OUTLINE_CENTER_CROSS:
useCursor(KisCursor::crossCursor());
break;
case CURSOR_STYLE_POINTER:
......
......@@ -522,7 +522,7 @@ void KisToolPaint::requestUpdateOutline(const QPointF &outlineDocPoint)
outlineMode = KisPaintOpSettings::CursorIsNotOutline;
if (mode() == KisTool::GESTURE_MODE ||
((cfg.cursorStyle() == CURSOR_STYLE_OUTLINE || cfg.cursorStyle() == CURSOR_STYLE_OUTLINE_CENTER_DOT )&&
((cfg.cursorStyle() == CURSOR_STYLE_OUTLINE || cfg.cursorStyle() == CURSOR_STYLE_OUTLINE_CENTER_DOT || cfg.cursorStyle() == CURSOR_STYLE_OUTLINE_CENTER_CROSS )&&
((mode() == HOVER_MODE && !specialHoverModeActive()) ||
(mode() == PAINT_MODE && cfg.showOutlineWhilePainting())))) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment