Commit 76fcc7ad authored by Spencer Brown's avatar Spencer Brown
Browse files

Add black and white 1-pixel cursors.

This feature was requested by Tonite on IRC and I think it's a good
idea to include it.
parent 93521cae
/* XPM */
static char *dummy[]={
"31 31 3 1",
". c None",
"# c None",
"a c #000000",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"..............###..............",
"..............#a#..............",
"..............###..............",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"..............................."};
/* XPM */
static char *dummy[]={
"31 31 3 1",
". c None",
"# c None",
"a c #ffffff",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"..............###..............",
"...............a...............",
"..............###..............",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"...............................",
"..............................."};
......@@ -6,6 +6,8 @@
<file>color-picker_layer_background.xpm</file>
<file>color-picker_layer_foreground.xpm</file>
<file>cursor-cross.xpm</file>
<file>cursor-pixel-white.xpm</file>
<file>cursor-pixel-black.xpm</file>
<file>cursor-round.xpm</file>
<file>cursor-triangle_lefthanded.xpm</file>
<file>cursor-triangle_righthanded.xpm</file>
......
......@@ -59,6 +59,8 @@ enum CursorStyle {
CURSOR_STYLE_CROSSHAIR,
CURSOR_STYLE_TRIANGLE_RIGHTHANDED,
CURSOR_STYLE_TRIANGLE_LEFTHANDED,
CURSOR_STYLE_BLACK_PIXEL,
CURSOR_STYLE_WHITE_PIXEL,
N_CURSOR_STYLE_SIZE
};
......
......@@ -89,6 +89,8 @@ GeneralTab::GeneralTab(QWidget *_parent, const char *_name)
m_cmbCursorShape->addItem(i18n("Crosshair"));
m_cmbCursorShape->addItem(i18n("Triangle Righthanded"));
m_cmbCursorShape->addItem(i18n("Triangle Lefthanded"));
m_cmbCursorShape->addItem(i18n("Black Pixel"));
m_cmbCursorShape->addItem(i18n("White Pixel"));
m_cmbOutlineShape->addItem(i18n("No Outline"));
m_cmbOutlineShape->addItem(i18n("Circle Outline"));
......
......@@ -59,6 +59,16 @@ QCursor KisCursor::roundCursor()
return load("cursor-round.xpm");
}
QCursor KisCursor::pixelBlackCursor()
{
return load("cursor-pixel-black.xpm");
}
QCursor KisCursor::pixelWhiteCursor()
{
return load("cursor-pixel-white.xpm");
}
QCursor KisCursor::waitCursor()
{
return Qt::WaitCursor;
......
......@@ -38,6 +38,8 @@ public:
static QCursor upArrowCursor(); // upwards arrow
static QCursor crossCursor(); // crosshair
static QCursor roundCursor(); // small open circle
static QCursor pixelBlackCursor(); // black single pixel
static QCursor pixelWhiteCursor(); // white single pixel
static QCursor waitCursor(); // hourglass/watch
static QCursor ibeamCursor(); // ibeam/text entry
static QCursor sizeVerCursor(); // vertical resize
......
......@@ -110,6 +110,12 @@ void KisToolFreehand::resetCursorStyle()
case CURSOR_STYLE_TRIANGLE_LEFTHANDED:
useCursor(KisCursor::triangleLeftHandedCursor());
break;
case CURSOR_STYLE_BLACK_PIXEL:
useCursor(KisCursor::pixelBlackCursor());
break;
case CURSOR_STYLE_WHITE_PIXEL:
useCursor(KisCursor::pixelWhiteCursor());
break;
case CURSOR_STYLE_TOOLICON:
default:
KisToolPaint::resetCursorStyle();
......
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