aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/qconf.cc18
1 files changed, 17 insertions, 1 deletions
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index b03cfadbd9ef..ca22676da4a9 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -776,10 +776,26 @@ void ConfigList::mouseReleaseEvent(QMouseEvent* e)
776 776
777 menu = item->menu; 777 menu = item->menu;
778 x = header()->offset() + p.x(); 778 x = header()->offset() + p.x();
779 idx = header()->sectionPosition(x); 779 idx = header()->logicalIndexAt(x);
780 switch (idx) { 780 switch (idx) {
781 case promptColIdx: 781 case promptColIdx:
782 icon = item->pixmap(promptColIdx); 782 icon = item->pixmap(promptColIdx);
783 if (!icon.isNull()) {
784 int off = header()->sectionPosition(0) + visualRect(indexAt(p)).x() + 4; // 4 is Hardcoded image offset. There might be a way to do it properly.
785 if (x >= off && x < off + icon.availableSizes().first().width()) {
786 if (item->goParent) {
787 emit parentSelected();
788 break;
789 } else if (!menu)
790 break;
791 ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN;
792 if (ptype == P_MENU && rootEntry != menu &&
793 mode != fullMode && mode != menuMode)
794 emit menuSelected(menu);
795 else
796 changeValue(item);
797 }
798 }
783 break; 799 break;
784 case noColIdx: 800 case noColIdx:
785 setValue(item, no); 801 setValue(item, no);