From: Till Theato Date: Sun, 1 Aug 2010 10:21:41 +0000 (+0000) Subject: Color Picker: Use select rectangle as cursor for rects with a width of 10 or larger X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=982c0be69cef7f936a6a6899c681f4ddeb389f29;p=kdenlive Color Picker: Use select rectangle as cursor for rects with a width of 10 or larger svn path=/trunk/kdenlive/; revision=4676 --- diff --git a/icons/hi128-action-kdenlive-select-all.png b/icons/hi128-action-kdenlive-select-all.png new file mode 100644 index 00000000..ba043fc2 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 index 00000000..6f722c96 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 index 00000000..2dd0fe8a 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 index 00000000..db927103 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 index 00000000..b2b8c0c2 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 index 00000000..ba043fc2 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 index 00000000..6f722c96 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 index 00000000..2dd0fe8a 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 index 00000000..db927103 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 index 00000000..b2b8c0c2 Binary files /dev/null and b/icons/ox64-action-kdenlive-select-all.png differ diff --git a/src/colorpickerwidget.cpp b/src/colorpickerwidget.cpp index 2cf12c3b..a6bafd93 100644 --- a/src/colorpickerwidget.cpp +++ b/src/colorpickerwidget.cpp @@ -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(); }