diff options
Diffstat (limited to 'utils/themeeditor/gui')
-rw-r--r-- | utils/themeeditor/gui/configdocument.cpp | 3 | ||||
-rw-r--r-- | utils/themeeditor/gui/configdocument.h | 11 |
2 files changed, 12 insertions, 2 deletions
diff --git a/utils/themeeditor/gui/configdocument.cpp b/utils/themeeditor/gui/configdocument.cpp index cfdd8c5c62..0962484ba9 100644 --- a/utils/themeeditor/gui/configdocument.cpp +++ b/utils/themeeditor/gui/configdocument.cpp | |||
@@ -187,7 +187,7 @@ QString ConfigDocument::toPlainText() const | |||
187 | void ConfigDocument::addRow(QString key, QString value) | 187 | void ConfigDocument::addRow(QString key, QString value) |
188 | { | 188 | { |
189 | QHBoxLayout* layout = new QHBoxLayout(); | 189 | QHBoxLayout* layout = new QHBoxLayout(); |
190 | QComboBox* keyEdit = new QComboBox(this); | 190 | NoScrollCombo* keyEdit = new NoScrollCombo(this); |
191 | QLineEdit* valueEdit = new QLineEdit(value, this); | 191 | QLineEdit* valueEdit = new QLineEdit(value, this); |
192 | QPushButton* delButton = new QPushButton(tr("-"), this); | 192 | QPushButton* delButton = new QPushButton(tr("-"), this); |
193 | QLabel* label = new QLabel(":"); | 193 | QLabel* label = new QLabel(":"); |
@@ -203,6 +203,7 @@ void ConfigDocument::addRow(QString key, QString value) | |||
203 | else | 203 | else |
204 | keyEdit->setEditText(key); | 204 | keyEdit->setEditText(key); |
205 | 205 | ||
206 | |||
206 | layout->addWidget(keyEdit); | 207 | layout->addWidget(keyEdit); |
207 | layout->addWidget(label); | 208 | layout->addWidget(label); |
208 | layout->addWidget(valueEdit); | 209 | layout->addWidget(valueEdit); |
diff --git a/utils/themeeditor/gui/configdocument.h b/utils/themeeditor/gui/configdocument.h index 8493c7a138..746ed94627 100644 --- a/utils/themeeditor/gui/configdocument.h +++ b/utils/themeeditor/gui/configdocument.h | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <QWidget> | 29 | #include <QWidget> |
30 | #include <QLabel> | 30 | #include <QLabel> |
31 | #include <QMap> | 31 | #include <QMap> |
32 | #include <QWheelEvent> | ||
32 | 33 | ||
33 | #include "tabcontent.h" | 34 | #include "tabcontent.h" |
34 | 35 | ||
@@ -36,6 +37,14 @@ namespace Ui { | |||
36 | class ConfigDocument; | 37 | class ConfigDocument; |
37 | } | 38 | } |
38 | 39 | ||
40 | class NoScrollCombo: public QComboBox | ||
41 | { | ||
42 | public: | ||
43 | NoScrollCombo(QWidget* parent = 0) : QComboBox(parent) {} | ||
44 | |||
45 | void wheelEvent(QWheelEvent* event) { event->ignore(); } | ||
46 | }; | ||
47 | |||
39 | class ConfigDocument : public TabContent { | 48 | class ConfigDocument : public TabContent { |
40 | Q_OBJECT | 49 | Q_OBJECT |
41 | public: | 50 | public: |
@@ -69,7 +78,7 @@ private slots: | |||
69 | private: | 78 | private: |
70 | Ui::ConfigDocument *ui; | 79 | Ui::ConfigDocument *ui; |
71 | QList<QHBoxLayout*> containers; | 80 | QList<QHBoxLayout*> containers; |
72 | QList<QComboBox*> keys; | 81 | QList<NoScrollCombo*> keys; |
73 | QList<QLineEdit*> values; | 82 | QList<QLineEdit*> values; |
74 | QList<QPushButton*> deleteButtons; | 83 | QList<QPushButton*> deleteButtons; |
75 | QList<QLabel*> labels; | 84 | QList<QLabel*> labels; |