lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 14 Oct 2015 16:03:25 +0200
From:	Michal Marek <mmarek@...e.com>
To:	Thiago Macieira <thiago.macieira@...el.com>,
	linux-kbuild@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org,
	Boris Barbulovski <bbarbulovski@...il.com>
Subject: Re: [PATCH 31/39] Port xconfig to Qt5 - Add horizontal scrollbar,
 and scroll per pixel.

On 2015-09-22 20:36, Thiago Macieira wrote:
> From: Boris Barbulovski <bbarbulovski@...il.com>
> 
> Signed-off-by: Boris Barbulovski <bbarbulovski@...il.com>
> Signed-off-by: Thiago Macieira <thiago.macieira@...el.com>
> ---
>  scripts/kconfig/qconf.cc | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> 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);
>  }

Somehow one of the patches to ConfigList (not this one) caused the
columns to take too much space. To reproduce this, enable Show Name,
Show Range and Show Data in the Option menu. Do you see the same issue?
The following patch fixes it for me, but perhaps there is a cleaner way
to do it.

Michal

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 73ce56a76271..1a428127711b 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -451,13 +451,17 @@ void ConfigList::updateList(ConfigItem* item)
 
 		updateMenuList(item, rootEntry);
 		update();
-		resizeColumnToContents(0);
+		for (int i = 0; i < columnCount(); i++) {
+			resizeColumnToContents(i);
+		}
 		return;
 	}
 update:
 	updateMenuList(this, rootEntry);
 	update();
-	resizeColumnToContents(0);
+	for (int i = 0; i < columnCount(); i++) {
+		resizeColumnToContents(i);
+	}
 }
 
 void ConfigList::setValue(ConfigItem* item, tristate val)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ