comboboxentry doesn't adjust width (BookwormPup64)

Moderator: Forum moderators

Post Reply
User avatar
don570
Posts: 770
Joined: Sat Nov 21, 2020 4:43 pm
Has thanked: 5 times
Been thanked: 144 times

comboboxentry doesn't adjust width (BookwormPup64)

Post by don570 »

comboboxentry widget (GTKDIALOG feature) doesn't adjust width

I'll give an example .
<comboboxentry width-request="80">

The width request is ignored.
I tried the script on Easy OS and fatdog64 and the width request was respected.

Code: Select all

#!/bin/bash
for P in gtkdialog4 gtkdialog3 gtkdialog; do
  GTKDIALOG=$(which $P) && break
done
VERSION=1.0
LENGTH=60
gtkdialog -v > /tmp/GTK
export TEST='
<window title="'Test' '"$VERSION"'" width-request="600">
<vbox>
				
	
<frame> 
     <text>
      <label>"'"$(grep  DISTRO_NAME   /etc/DISTRO_SPECS)"'"</label>
    </text>
  <text>
     <input file>'/tmp/GTK'</input>
     </text>
 </frame>

<hbox homogeneous="true">	
<hbox>


<hbox><frame Length>
 <comboboxentry width-request="80">
      <variable>LENGTH</variable>
      <default>'$LENGTH'</default>
      <item>30</item>
      <item>60</item>
      <item>90</item>
      <item>120</item>
      <item>180</item>
      <item>240</item>
    </comboboxentry>
      </frame>
</hbox>
         <frame Source Device>
<hbox> 
         <comboboxentry activates_default="true">
                <default>default</default>
				<item>hw:0</item>
				<item>hw:1</item>
				<variable>DEV</variable>
			</comboboxentry>
           </hbox> </frame>
</hbox>
</hbox>
</vbox> 
</window>
'
$GTKDIALOG -p TEST -c
   
exit 0 /code] [attachment=0]bookwornpup64.png[/attachment]
Attachments
bookwornpup64.png
bookwornpup64.png (25.34 KiB) Viewed 319 times
Last edited by bigpup on Sat Mar 01, 2025 5:11 pm, edited 3 times in total.
Reason: added Puppy version to topic subject
User avatar
don570
Posts: 770
Joined: Sat Nov 21, 2020 4:43 pm
Has thanked: 5 times
Been thanked: 144 times

Re: comboboxentry doesn't adjust width

Post by don570 »

Here is the same script in Easy OS

scarthgap.png
scarthgap.png (26.11 KiB) Viewed 285 times
User avatar
MochiMoppel
Posts: 1343
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 22 times
Been thanked: 521 times

Re: comboboxentry doesn't adjust width

Post by MochiMoppel »

Instead of checking for gtkdialog versions that are long dead (gtkdialog3,gtkdialog4)

Code: Select all

for P in gtkdialog4 gtkdialog3 gtkdialog; do
  GTKDIALOG=$(which $P) && break
done

check for versions that exist. In BockwormPup64 there are 2, and gtk2dialog, the one "Built with support for: GTK +2", still respects width-request

Code: Select all

for P in gtk2dialog gtkdialog; do
  GTKDIALOG=$(which $P) && break
done

In order to see the correct version information you also need to fix line 7. Should be $GTKDIALOG -v > /tmp/GTK

User avatar
don570
Posts: 770
Joined: Sat Nov 21, 2020 4:43 pm
Has thanked: 5 times
Been thanked: 144 times

Re: comboboxentry doesn't adjust width

Post by don570 »

Thanks for info
_________________

radky
Posts: 377
Joined: Fri May 28, 2021 2:14 am
Has thanked: 42 times
Been thanked: 339 times

Re: comboboxentry doesn't adjust width

Post by radky »

@don570

Restricted scaling of the comboboxentry widget is one of many changes observed as the GTK2 widget toolkit transitioned to GTK3. For example, the GTK2 comboboxentry widget fully supports the width-request parameter but the GTK3 version ignores the width-request parameter until the selected value exceeds an arbitrary (hardcoded) minimum-allowable width.

For example, in your code above, change the width-request from 80 to a significantly higher value (such as 250) and the comboboxentry widget will upscale correctly with the GTK3 version of gtkdialog.

On the other hand, it seems the companion comboboxtext widget will upscale and downscale correctly with both GTK2 and GTK3 versions of gtkdialog.

User avatar
don570
Posts: 770
Joined: Sat Nov 21, 2020 4:43 pm
Has thanked: 5 times
Been thanked: 144 times

Re: comboboxentry doesn't adjust width

Post by don570 »

On the other hand, it seems the companion comboboxtext widget will upscale and downscale correctly with both GTK2 and GTK3 versions of gtkdialog.

I want to use the comboboxentry widget so I can edit the length of a recording.
comboboxtext widget doesn't allow this so I won't use it.
________________________________________________

Post Reply

Return to “BookwormPup”