How can I modify gtk-dialog colours?

Using applications, configuring, problems
Message
Author
User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#21 Post by MochiMoppel »

SFR wrote:It seems that GTK uses Pango to convert color names to hex values and source shows that Pango has its own RGB definitions
Ah, we are getting to the bottom of this. It seems that it's the other way round: Pango just follows the changes made by the GTK devs.:
https://stackoverflow.com/questions/260 ... n-too-dark

Strange that Mike is the first to have noticed this change. The cleanest way to fix it is to change -bg green to -bg "#00FF00" (or short "#0F0") in all affected scripts. Surrounding quotes are mandatory to avoid interpretation as bash comment.

I don't use flagship puppies on my old hardware, but I can mount their sfs and when mounting a Stretch7.5 sfs I see that 12 scripts are affected and 20 changes would have to be made. Shouldn't be an impossible task for the woof-CE folks (should be possible with a single sed command: sed -i 's/-bg green/-bg "#00FF00"/g' filepath1 filepath2 filepath3 etc.)

Here the list with the files and the affected line numbers (thanks to MMview :wink: )

Code: Select all

/root/network/Network/AppRun
--------------------------
192: killall yaf-splash && yaf-splash -placement top -bg green -timeout 2 -text 'Finished!'


/usr/bin/uefi-usb-installer
--------------------------
390: 	gtkdialog-splash -close never -timeout 3 -bg green -text "$GSPLASH $dev1" &

/usr/bin/wvdialshell
--------------------------
28: rxvt -geometry 80x5 -bg green -title "wvdial: close window to disconnect" -e wvdial

/usr/bin/xsaneshell
--------------------------
141: 	gtkdialog-splash -bg green -close never -text "$WAIT_MSG" &

/usr/local/jwmdesk/menumanager
--------------------------
98:        gtkdialog-splash -timeout 1 -fontsize large -bg green -text "$(gettext 'Enabling') ${N} $(gettext 'at startup.')" &

/usr/local/simple_network_setup/rc.network
--------------------------
306:       [ "$DISPLAY" ] &&  yaf-splash -placement bottom -bg green -timeout 5 -text "Network interface ${INTERFACE} has been activated" &

/usr/sbin/filemnt
--------------------------
210:     /usr/lib/gtkdialog/box_splash -timeout 6 -bg green -text "`eval_gettext "Click \\\$imgFileBASE icon again to unmount it"`" &
248:     /usr/lib/gtkdialog/box_splash -timeout 3 -bg green -text "$(gettext 'Unmounted') $imgFileBASE" #BK

/usr/sbin/get_libreoffice
--------------------------
116: gtkdialog-splash  -close never -icon /usr/share/pixmaps/clock32.svg -bg green -text "$INFOMSG1" &
328: 	 gtkdialog-splash -bg green -timeout 2 -text "$LIBO_VER_DIR chosen"
789:     gtkdialog-splash -timeout 5 -close box -bg green -icon gtk-apply -text "$INFOMESSAGE5a ... ${LIBOBUILD}.sfs $INFOMESSAGE5b"

/usr/sbin/momanager
--------------------------
989:   /usr/lib/gtkdialog/box_splash -bg green -timeout 3 -text "The menu is being updated..." &
1040:   /usr/lib/gtkdialog/box_splash -bg green -timeout 3 -text "The menu is being updated..." &
1166:   /usr/lib/gtkdialog/box_splash -bg green -timeout 3 -text "The desktop and menus are being updated..." &
1342:   /usr/lib/gtkdialog/box_splash -bg green -timeout 3 -text "The desktop and menus are being updated..." &

/usr/sbin/pupswap
--------------------------
331: 		/usr/lib/gtkdialog/box_splash -close never -bg green -timeout 3 -text "$msg"
362: 		[ $GUI ] && /usr/lib/gtkdialog/box_splash -close never -bg green -timeout 3 -text "$msg"

/usr/sbin/usb_modeswitch_status
--------------------------
89:  DISPLAY=":0" /usr/lib/gtkdialog/box_splash -placement center -close never -timeout 12 -bg green -fontsize large -text "$(gettext '3G USB modem now ready for use')" &

/usr/sbin/wmstartups
--------------------------
65:        /usr/lib/gtkdialog/box_splash -timeout 1 -bg green -text "$(gettext 'Enabling') ${N} $(gettext 'at startup.')"
115:      /usr/lib/gtkdialog/box_splash -timeout 2 -bg green -text "$(gettext 'adding') ${Entry1} $(gettext 'to startup')"

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#22 Post by Mike Walsh »

@ MochiMoppel:-
MochiMoppel wrote:Strange that Mike is the first to have noticed this change.
Mm. Given that Xenialpup64 has been out for over 3 years now, I don't believe that for a minute. Perhaps I'm just the first to find it enough of an issue to be worth mentioning on the Forum? Couldn't say....

The research is, however, appreciated.


Mike. Image

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#23 Post by MochiMoppel »

I wrote:What however is strange is that /usr/share/X11/rgb.txt in Stretch7.5 defines green as "0 255 0 Green", which would be the lighter #00FF00, so why is green rendered as #00800? The flagship captains should know.
I'm finally able to answer my own question: It's irrelevant what rgb.txt defines because this file is deprecated since many years. Even in my old Slacko 5.6 only netpbm utilities and gcolor2 use it. Color names and their hex values are now all compiled into file Xorg.

Post Reply