gtk1.2 default installation doesn't need to look so ordinary

Bug #71071 reported by Obleak
16
Affects Status Importance Assigned to Milestone
gtk+1.2 (Ubuntu)
Triaged
Wishlist
Ubuntu Desktop Bugs

Bug Description

Binary package hint: libgtk1.2-common

I have some information about this and a fix.

A default ubuntu install (I'm using edgy in this example) does not install gtk1.2 by default.
When an application is added (say xmms) that is dependant on gtk1.2, the libgtk1.2-common package gets installed which provides the system defaults

http://packages.ubuntu.com/edgy/misc/libgtk1.2-common

Problems with the defaults are
#1 it uses a font which looks terrible without anti-alising, and is too big
#2 the default style belongs in the 1980's

althought most gtk apps have migrated to gtk2 by now, there's quite a few commercial apps that use gtk1.2 still - and why do we want commercial apps to look so ordinary???

#1 Details of default font

as ubuntu uses utf8, the font defaults for gtk1.2 come from
/etc/gtk/gtkrc.utf-8

style "default-text" {
       fontset = "-*-arial-medium-r-normal--*-120-*-*-*-*-iso10646-1,\
                  -*-helvetica-medium-r-normal--*-120-*-*-*-*-*-*"
}

arial is not installed by default, so gtk reverts to the helvetica font.
plugging in the same attributs into xfontsel we get (see attached image)

#2 Details of the default style

I don't know about everyone else but to me that grey blocky default theme is just an eyestrain. (see 2nd attached image)

Coupled with the larger than usual font the whole effect is a bit amaturish - note how in the attached image the word 'Digital1' in the dropdown menu has been chopped - both the bottom and the end. Also note how the 0.0 1.0 2.0 numbering at the bottom of the image have crept upwards beyond the bar they are in.

THE FIX

All that needs to be done is

#1 set a default font that
a) is actually installed
b) is the same size as the default gtk2 font
c) looks decent without anti-aliasing

Here are two defaults that look pretty good
-adobe-helvetica-medium-o-normal-­ -10-100-75-75-p-57-iso10646-1
-schumacher-clean-medium-r-normal­ -*-*-120-*-*-c-*-iso10646-1

#2 install a gtk1.2 theme either by including it in the libgtk1.2-common package or making libgtk1.2-common dependant on it.

a) interestingly if I install and run 'gtk-theme-switch' from the cli, by default I have a choice of two gtk themes (which is odd because only Default has been installed) - Default (yurk) and IndustrialTango. Previewing IndustrialTango results in:

Gtk-WARNING **: Unable to locate loadable module in module_path: "libinudustrial.so"

me thinks the gtk-industrial-tango package should have been installed with libgtk1.2!!!
a quick apt-get install gtk-industrial-tango later and we can finally fix up these ugly looking gtk apps

#3 set a system default.
This bit is really easy

simply create a /etc/gtk/gtkrc file and put in it directions for the two different issues.
note this will get overridden by a ~/.gtkrc.mine file so we are not locking users into anything dramatic.
=============================================================
include "/usr/share/themes/IndustrialTango/gtk/gtkrc"

style "default-text" {
fontset = "-adobe-helvetica-medium-o-normal--10-100-75-75-p-57-iso10646-1,\
           -*-r-*-iso10646-1,*"
}

class "*" style "default-text"
=============================================================

save & run any gtk1.2 app - looks a bit better huh???

so in summary here is all that needs to be done to make gtk1.2 apps look decent by default

#1 make the libgtk1.2-common package dependent on the gtk-industrial-tango package (like it should be????)

#2 inlcude the /etc/gtk/gtkrc file as above that we have some sort of a decent system wide default Theme for gtk1.2 apps

Tags: font gtk1.2
Revision history for this message
Obleak (fraser-arkhostings) wrote :
Revision history for this message
Obleak (fraser-arkhostings) wrote :
description: updated
Revision history for this message
Angelo Lisco (angystardust-gmail) wrote :

Please, fix it in Gutsy...
there are some important gtk1 apps out there (ex.: putty and xmms) that are used everyday by many people (see popcon for knowning what i mean).

Changed in gtk+1.2:
status: Unconfirmed → Confirmed
Revision history for this message
Obleak (fraser-arkhostings) wrote :

packages have changed under feisty, no more libindustrialtango.so

you'd need to do the follow to achieve what I outlined for edgy
(see attached image for end result)

1) apt-get install gtk-engines-industrial industrialtango-theme

2) create /etc/gtk/gtkrc and insert the following
=============================================================
include "/usr/share/themes/IndustrialTango/gtk/gtkrc"

style "default-text" {
fontset = "-adobe-helvetica-medium-o-normal--10-100-75-75-p-57-iso10646-1,\
           -*-r-*-iso10646-1,*"
}

class "*" style "default-text"
=============================================================

also: it wouldn't be too hard to modify industrial-tango to make industrial-ubuntu...

Revision history for this message
Andreas Moog (ampelbein) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering is this still an issue for you? Can you try with latest Ubuntu release? Thanks in advance.

Changed in gtk+1.2:
assignee: nobody → andreas-moog
status: Confirmed → Incomplete
Revision history for this message
Obleak (fraser-arkhostings) wrote :

Hi Andreas,

Yes it's still the same. (in hardy amd64) though the gtk industrial tango theme has changed names again

1) apt-get install industrialtango-theme

2) create /etc/gtk/gtkrc and insert the following
=============================================================
include "/usr/share/themes/IndustrialTango/gtk/gtkrc"

style "default-text" {
fontset = "-adobe-helvetica-medium-o-normal--10-100-75-75-p-57-iso10646-1,\
           -*-r-*-iso10646-1,*"
}

class "*" style "default-text"
=============================================================
attached is a tgz showing the progression from default->better font->better font+theme

(still think a ubuntu gtk1.2 theme would be cool, base it on the industrial-tango theme and "ubuntise" the colours in a new gtkrc)

BTW (off topic) xmms is missing from the repos even though the xmms plugins are still available?
so I've used putty as an example gtk1.2 app

Andreas Moog (ampelbein)
Changed in gtk+1.2:
assignee: andreas-moog → desktop-bugs
importance: Undecided → Wishlist
status: Incomplete → Confirmed
status: Confirmed → Triaged
Revision history for this message
Pedro Soria-Rodriguez (pedrosoriarodriguez) wrote :

The behaviour described by Obleak on 2006-11 is still present in Ubuntu 9.04.
I support the fixs proposed by Obleak.

Revision history for this message
Angelo Lisco (angystardust-gmail) wrote :

I just tried karmic alpha-4 (ubuntu 9.10) and I was very happy to find that putty is finally linked against gtk2!
Is it possible to backport the version uploaded in karmic to hardy?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.