]> git.sesse.net Git - kdenlive/commitdiff
Color Picker: Use select rectangle as cursor for rects with a width of 10 or larger
authorTill Theato <root@ttill.de>
Sun, 1 Aug 2010 10:21:41 +0000 (10:21 +0000)
committerTill Theato <root@ttill.de>
Sun, 1 Aug 2010 10:21:41 +0000 (10:21 +0000)
svn path=/trunk/kdenlive/; revision=4676

icons/hi128-action-kdenlive-select-all.png [new file with mode: 0644]
icons/hi22-action-kdenlive-select-all.png [new file with mode: 0644]
icons/hi32-action-kdenlive-select-all.png [new file with mode: 0644]
icons/hi48-action-kdenlive-select-all.png [new file with mode: 0644]
icons/hi64-action-kdenlive-select-all.png [new file with mode: 0644]
icons/ox128-action-kdenlive-select-all.png [new file with mode: 0644]
icons/ox22-action-kdenlive-select-all.png [new file with mode: 0644]
icons/ox32-action-kdenlive-select-all.png [new file with mode: 0644]
icons/ox48-action-kdenlive-select-all.png [new file with mode: 0644]
icons/ox64-action-kdenlive-select-all.png [new file with mode: 0644]
src/colorpickerwidget.cpp

diff --git a/icons/hi128-action-kdenlive-select-all.png b/icons/hi128-action-kdenlive-select-all.png
new file mode 100644 (file)
index 0000000..ba043fc
Binary files /dev/null and b/icons/hi128-action-kdenlive-select-all.png differ
diff --git a/icons/hi22-action-kdenlive-select-all.png b/icons/hi22-action-kdenlive-select-all.png
new file mode 100644 (file)
index 0000000..6f722c9
Binary files /dev/null and b/icons/hi22-action-kdenlive-select-all.png differ
diff --git a/icons/hi32-action-kdenlive-select-all.png b/icons/hi32-action-kdenlive-select-all.png
new file mode 100644 (file)
index 0000000..2dd0fe8
Binary files /dev/null and b/icons/hi32-action-kdenlive-select-all.png differ
diff --git a/icons/hi48-action-kdenlive-select-all.png b/icons/hi48-action-kdenlive-select-all.png
new file mode 100644 (file)
index 0000000..db92710
Binary files /dev/null and b/icons/hi48-action-kdenlive-select-all.png differ
diff --git a/icons/hi64-action-kdenlive-select-all.png b/icons/hi64-action-kdenlive-select-all.png
new file mode 100644 (file)
index 0000000..b2b8c0c
Binary files /dev/null and b/icons/hi64-action-kdenlive-select-all.png differ
diff --git a/icons/ox128-action-kdenlive-select-all.png b/icons/ox128-action-kdenlive-select-all.png
new file mode 100644 (file)
index 0000000..ba043fc
Binary files /dev/null and b/icons/ox128-action-kdenlive-select-all.png differ
diff --git a/icons/ox22-action-kdenlive-select-all.png b/icons/ox22-action-kdenlive-select-all.png
new file mode 100644 (file)
index 0000000..6f722c9
Binary files /dev/null and b/icons/ox22-action-kdenlive-select-all.png differ
diff --git a/icons/ox32-action-kdenlive-select-all.png b/icons/ox32-action-kdenlive-select-all.png
new file mode 100644 (file)
index 0000000..2dd0fe8
Binary files /dev/null and b/icons/ox32-action-kdenlive-select-all.png differ
diff --git a/icons/ox48-action-kdenlive-select-all.png b/icons/ox48-action-kdenlive-select-all.png
new file mode 100644 (file)
index 0000000..db92710
Binary files /dev/null and b/icons/ox48-action-kdenlive-select-all.png differ
diff --git a/icons/ox64-action-kdenlive-select-all.png b/icons/ox64-action-kdenlive-select-all.png
new file mode 100644 (file)
index 0000000..b2b8c0c
Binary files /dev/null and b/icons/ox64-action-kdenlive-select-all.png differ
index 2cf12c3bca0def4ee2b083377e8104ddc76e46e2..a6bafd9387b852288653f32bd3120e93fb73da52 100644 (file)
@@ -71,8 +71,8 @@ ColorPickerWidget::ColorPickerWidget(QWidget *parent) :
 
     m_size = new QSpinBox(this);
     m_size->setMinimum(1);
-    // Use qMax here, to make it possible to get the average for the whole screen
-    m_size->setMaximum(qMax(qApp->desktop()->geometry().width(), qApp->desktop()->geometry().height()));
+    // Use qMin here, as we might run into troubles with the cursor otherwise.
+    m_size->setMaximum(qMin(qApp->desktop()->geometry().width(), qApp->desktop()->geometry().height()));
     m_size->setValue(1);
 
     layout->addWidget(button);
@@ -176,10 +176,10 @@ void ColorPickerWidget::slotSetupEventFilter()
     m_filter = new KCDPickerFilter(this);
     kapp->installX11EventFilter(m_filter);
 #endif
-    if (m_size->value() == 1)
+    if (m_size->value() < 10)
         grabMouse(QCursor(KIcon("color-picker").pixmap(22, 22), 0, 21));
     else
-        grabMouse(Qt::CrossCursor);
+        grabMouse(QCursor(KIcon("kdenlive-select-all").pixmap(m_size->value(), m_size->value())));
     grabKeyboard();
 }