diff mbox

[31/39] Port xconfig to Qt5 - Add horizontal scrollbar, and scroll per pixel.

Message ID 1442946999-37018-32-git-send-email-thiago.macieira@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Thiago Macieira Sept. 22, 2015, 6:36 p.m. UTC
From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.cc | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox

Patch

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index e5bfa6b..2ef06c1 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -318,6 +318,9 @@  ConfigList::ConfigList(ConfigView* p, const char *name)
 	setSortingEnabled(false);
 	setRootIsDecorated(true);
 
+	setVerticalScrollMode(ScrollPerPixel);
+	setHorizontalScrollMode(ScrollPerPixel);
+
 	setHeaderLabels(QStringList() << _("Option") << _("Name") << "N" << "M" << "Y" << _("Value"));
 
 	connect(this, SIGNAL(itemSelectionChanged(void)),
@@ -453,11 +456,13 @@  void ConfigList::updateList(ConfigItem* item)
 
 		updateMenuList(item, rootEntry);
 		update();
+		resizeColumnToContents(0);
 		return;
 	}
 update:
 	updateMenuList(this, rootEntry);
 	update();
+	resizeColumnToContents(0);
 }
 
 void ConfigList::setValue(ConfigItem* item, tristate val)