Port xconfig to Qt5 - Add horizontal scrollbar, and scroll per pixel.
authorBoris Barbulovski <bbarbulovski@gmail.com>
Tue, 22 Sep 2015 18:36:31 +0000 (11:36 -0700)
committerMichal Marek <mmarek@suse.com>
Wed, 14 Oct 2015 12:59:03 +0000 (14:59 +0200)
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
scripts/kconfig/qconf.cc

index 9edb9c5..10fe15d 100644 (file)
@@ -318,6 +318,9 @@ ConfigList::ConfigList(ConfigView* p, const char *name)
        setSortingEnabled(false);
        setRootIsDecorated(true);
 
        setSortingEnabled(false);
        setRootIsDecorated(true);
 
+       setVerticalScrollMode(ScrollPerPixel);
+       setHorizontalScrollMode(ScrollPerPixel);
+
        setHeaderLabels(QStringList() << _("Option") << _("Name") << "N" << "M" << "Y" << _("Value"));
 
        connect(this, SIGNAL(itemSelectionChanged(void)),
        setHeaderLabels(QStringList() << _("Option") << _("Name") << "N" << "M" << "Y" << _("Value"));
 
        connect(this, SIGNAL(itemSelectionChanged(void)),
@@ -450,11 +453,13 @@ void ConfigList::updateList(ConfigItem* item)
 
                updateMenuList(item, rootEntry);
                update();
 
                updateMenuList(item, rootEntry);
                update();
+               resizeColumnToContents(0);
                return;
        }
 update:
        updateMenuList(this, rootEntry);
        update();
                return;
        }
 update:
        updateMenuList(this, rootEntry);
        update();
+       resizeColumnToContents(0);
 }
 
 void ConfigList::setValue(ConfigItem* item, tristate val)
 }
 
 void ConfigList::setValue(ConfigItem* item, tristate val)