summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-06-17 07:34:24 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-06-17 07:34:24 +0000
commit1dc2c5ebcbdf2046c2aad6314018796fe3d0d06e (patch)
tree0c8dea31338eb2915224847c72cdacbb7caf8944
parent75560845aad0cc8d1fccfeda5534489ca278ac80 (diff)
downloadrockbox-1dc2c5ebcbdf2046c2aad6314018796fe3d0d06e.zip
rockbox-1dc2c5ebcbdf2046c2aad6314018796fe3d0d06e.tar.gz
rockbox-1dc2c5ebcbdf2046c2aad6314018796fe3d0d06e.tar.bz2
rockbox-1dc2c5ebcbdf2046c2aad6314018796fe3d0d06e.tar.xz
Theme Editor: Stopped combo boxes in configuration editor from scrolling on mouse-wheel
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26879 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--utils/themeeditor/gui/configdocument.cpp3
-rw-r--r--utils/themeeditor/gui/configdocument.h11
2 files changed, 12 insertions, 2 deletions
diff --git a/utils/themeeditor/gui/configdocument.cpp b/utils/themeeditor/gui/configdocument.cpp
index cfdd8c5..0962484 100644
--- a/utils/themeeditor/gui/configdocument.cpp
+++ b/utils/themeeditor/gui/configdocument.cpp
@@ -187,7 +187,7 @@ QString ConfigDocument::toPlainText() const
void ConfigDocument::addRow(QString key, QString value)
{
QHBoxLayout* layout = new QHBoxLayout();
- QComboBox* keyEdit = new QComboBox(this);
+ NoScrollCombo* keyEdit = new NoScrollCombo(this);
QLineEdit* valueEdit = new QLineEdit(value, this);
QPushButton* delButton = new QPushButton(tr("-"), this);
QLabel* label = new QLabel(":");
@@ -203,6 +203,7 @@ void ConfigDocument::addRow(QString key, QString value)
else
keyEdit->setEditText(key);
+
layout->addWidget(keyEdit);
layout->addWidget(label);
layout->addWidget(valueEdit);
diff --git a/utils/themeeditor/gui/configdocument.h b/utils/themeeditor/gui/configdocument.h
index 8493c7a..746ed94 100644
--- a/utils/themeeditor/gui/configdocument.h
+++ b/utils/themeeditor/gui/configdocument.h
@@ -29,6 +29,7 @@
#include <QWidget>
#include <QLabel>
#include <QMap>
+#include <QWheelEvent>
#include "tabcontent.h"
@@ -36,6 +37,14 @@ namespace Ui {
class ConfigDocument;
}
+class NoScrollCombo: public QComboBox
+{
+public:
+ NoScrollCombo(QWidget* parent = 0) : QComboBox(parent) {}
+
+ void wheelEvent(QWheelEvent* event) { event->ignore(); }
+};
+
class ConfigDocument : public TabContent {
Q_OBJECT
public:
@@ -69,7 +78,7 @@ private slots:
private:
Ui::ConfigDocument *ui;
QList<QHBoxLayout*> containers;
- QList<QComboBox*> keys;
+ QList<NoScrollCombo*> keys;
QList<QLineEdit*> values;
QList<QPushButton*> deleteButtons;
QList<QLabel*> labels;