delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2016/03/30/04:22:56

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Date: Wed, 30 Mar 2016 10:27:05 +0200 (CEST)
X-X-Sender: igor2 AT igor2priv
To: "Bert Timmerman (bert DOT timmerman AT xs4all DOT nl) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
X-Debug: to=geda-user AT delorie DOT com from="gedau AT igor2 DOT repo DOT hu"
From: gedau AT igor2 DOT repo DOT hu
Subject: Re: [geda-user] pcb gtk bugreport
In-Reply-To: <56FB687B.8000904@xs4all.nl>
Message-ID: <alpine.DEB.2.00.1603300942550.7885@igor2priv>
References: <alpine DOT DEB DOT 2 DOT 00 DOT 1603300424250 DOT 7885 AT igor2priv> <56FB687B DOT 8000904 AT xs4all DOT nl>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
MIME-Version: 1.0
Reply-To: geda-user AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-user AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com


On Wed, 30 Mar 2016, Bert Timmerman (bert DOT timmerman AT xs4all DOT nl) [via geda-user AT delorie DOT com] wrote:

> 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
>

Reading the patch, I don't see any part that'd change the toolbar 
behavior, it's just a some padding pixel value changes and info text 
format string.

Btw, you can easily test if the bug is still persent in a branch: just 
delete msot menus from gpcb-menu.res and run pcb.


- Raw text -


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