delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2016/03/30/01:48:54

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Message-ID: <56FB687B.8000904@xs4all.nl>
Date: Wed, 30 Mar 2016 07:47:39 +0200
From: "Bert Timmerman (bert DOT timmerman AT xs4all DOT nl) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.19) Gecko/20110429 Fedora/2.0.14-1.fc13 SeaMonkey/2.0.14
MIME-Version: 1.0
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] pcb gtk bugreport
References: <alpine DOT DEB DOT 2 DOT 00 DOT 1603300424250 DOT 7885 AT igor2priv>
In-Reply-To: <alpine.DEB.2.00.1603300424250.7885@igor2priv>
Reply-To: geda-user AT delorie DOT com

gedau AT igor2 DOT repo DOT hu wrote:
> Hi all,
>
> while rewriting the menu.res infrastructure in pcb-rnd, I stumbled 
> upon the following gtk hid bug.
>
> If "Alternate window layout to allow smaller vertical size" is set and 
> gpcb-menu.res is edited to be shorter, some of the tools may disappear:
>
> http://igor2.repo.hu/tmp/pcb_gtk1.jpg
>
> I'd expect the box to be as wide as the wider one of the menu bar and 
> tools (mode_toolbar), but currently it's only as wide as the menu bar. 
> Which goes unnoticed, provided the menu bar is wide enough.
>
> I've "fixed" it in pcb-rnd r1439. It's an ugly workaround, but tested 
> it with all combination of short/long menu bars and alternate layout 
> options and always worked properly. Also, if the workaround breaks, 
> worst case it can't end up being more broken than before.
>
>
>
>
> Details: it seems adding image to a toolbar button doesn't set the 
> requisite size of the button properly, but leaves it 0. In turn this 
> ends up creating the whole toolbar with requisite width of 0. This 
> means the toolbar doesn't try to make its container any wider than 0 
> pixels, no matter how many tool buttons we pack.
>
> If other widgets in the same box system sets up the container of the 
> toolbar to be wide enough, things properly display, otherwise the 
> leftmost widgets of the toolbar is displayed until the first widget 
> (button) that can't be fully fit.
>
> I couldn't figure how to fix the requisite size. (gtk+2 is a PITA). 
> Instead, I calculated the expected width of the toolbar looking at 
> input icon image widths and packed an invisible hbox that is just as 
> wide as all the buttons need. This invisible hbox stretches its parent 
> to the right width. The same parent is the parent of the toolbar, so 
> it just works.
>
> Don't ask me why I had to use the 3/4 of the calculated width to set 
> up the invisible box.
>
> If someone figures how to fix this properly, please send me the patch 
> so I can fix it in pcb-rnd.
>
> Regards,
>
> Igor2
Hi Igor2,

Could you have a look at:

http://git.geda-project.org/pcb/commit/?h=home/bert/LP699164&id=90f4ccfc0a1ca2abe3344e698cb74701fee0d683

Kind regards,

Bert Timmerman.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019