Home » Developing U++ » U++ TheIDE and Library: Releases and ChangeLogs » GTK theming a reality
Re: GTK theming a reality [message #6814 is a reply to message #6813] |
Wed, 29 November 2006 11:57 |
|
mirek
Messages: 13975 Registered: November 2005
|
Ultimate Member |
|
|
guido wrote on Wed, 29 November 2006 05:47 |
Congratulations!
Already working on icon theming?
|
That is the next step. Actually, there is not too many icons import now (only for message boxes and OK Cancel buttons).
Well, I can also import "common" icons for Cut/Copy/Paste, but maybe I will do so rather on "app demand". There is also a problem with icon size...
Quote: |
Currently it shares a problem I got with Firefox 2.0 (1.5 was OK) in that application font is two points too big. I can make it smaller by increasing the Xserver DPI setting from 72 to 120, but than the other GTK apps have tiny fonts.
Could you please tell me, how the font size is retreived?
|
Sure:
char *font_name = "";
GOBJ().g_object_get(GTK().gtk_settings_get_default(), "gtk-font-name", &font_name, NULL);
const char *q = strrchr(font_name, ' ');
if(q) {
int h = atoi(q);
String face(font_name, q);
int ii = Font::FindFaceNameIndex(face);
if(ii < 0)
if(ToUpper(face[0]) == 'M')
ii = Font::COURIER;
else
if(ToUpper(face[0]) == 'S' && ToUpper(face[1]) == 'e')
ii = Font::ROMAN;
else
ii = Font::ARIAL;
Draw::SetStdFont(Font(ii, h ? h * 96 / 72 : 13));
}
(in short, it expects h * 96 / 72 converts retrieved point size to 96dpi screen pixels).
For me, font is exactly as big as in other gnome apps. But as you already noted, I tend to oversimplify things, maybe this simple height retrieval needs to take into account more factors?
Mirek
|
|
|
|
|
GTK theming a reality
By: mirek on Sun, 26 November 2006 01:20
|
|
|
Re: GTK theming a reality
|
|
|
Re: GTK theming a reality
By: mirek on Sun, 26 November 2006 21:33
|
|
|
Re: GTK theming a reality
By: masu on Sun, 26 November 2006 22:01
|
|
|
Re: GTK theming a reality
By: mirek on Sun, 26 November 2006 22:07
|
|
|
Re: GTK theming a reality
By: masu on Sun, 26 November 2006 22:20
|
|
|
Re: GTK theming a reality
By: mirek on Sun, 26 November 2006 23:05
|
|
|
Re: GTK theming a reality
By: masu on Sun, 26 November 2006 23:27
|
|
|
Re: GTK theming a reality
By: masu on Tue, 28 November 2006 13:56
|
|
|
Re: GTK theming a reality
By: guido on Wed, 29 November 2006 11:47
|
|
|
Re: GTK theming a reality
By: mirek on Wed, 29 November 2006 11:57
|
|
|
Re: GTK theming a reality
By: guido on Wed, 29 November 2006 20:12
|
|
|
Re: GTK theming a reality
By: mirek on Wed, 29 November 2006 20:29
|
|
|
Re: GTK theming a reality
By: guido on Thu, 30 November 2006 20:52
|
|
|
Re: GTK theming a reality
By: guido on Thu, 30 November 2006 20:58
|
|
|
Re: GTK theming a reality
By: masu on Thu, 30 November 2006 21:04
|
|
|
Re: GTK theming a reality
By: mirek on Thu, 30 November 2006 21:24
|
|
|
Re: GTK theming a reality
By: guido on Thu, 30 November 2006 21:29
|
|
|
Re: GTK theming a reality
By: masu on Thu, 30 November 2006 21:37
|
|
|
Re: GTK theming a reality
By: mirek on Thu, 30 November 2006 21:46
|
|
|
Re: GTK theming a reality
By: mirek on Thu, 30 November 2006 21:58
|
|
|
Re: GTK theming a reality
By: masu on Thu, 30 November 2006 22:45
|
|
|
Re: GTK theming a reality
By: mirek on Thu, 30 November 2006 22:50
|
|
|
Re: GTK theming a reality
By: mirek on Thu, 30 November 2006 22:54
|
|
|
Re: GTK theming a reality
By: masu on Thu, 30 November 2006 23:07
|
|
|
Re: GTK theming a reality
By: guido on Thu, 30 November 2006 21:27
|
|
|
Re: GTK theming a reality
By: mirek on Sat, 02 December 2006 10:38
|
|
|
Re: GTK theming a reality
By: masu on Sun, 03 December 2006 00:16
|
|
|
Re: GTK theming a reality
By: mirek on Sun, 03 December 2006 12:44
|
|
|
Re: GTK theming a reality
By: masu on Sun, 03 December 2006 15:17
|
|
|
Re: GTK theming a reality
By: guido on Sun, 03 December 2006 16:37
|
|
|
Re: GTK theming a reality
By: mirek on Tue, 05 December 2006 19:56
|
|
|
Re: GTK theming a reality
|
|
|
Re: GTK theming a reality
By: masu on Tue, 05 December 2006 21:27
|
|
|
Re: GTK theming a reality
|
|
|
Re: GTK theming a reality
By: masu on Tue, 05 December 2006 21:58
|
|
|
Re: GTK theming a reality
By: masu on Wed, 06 December 2006 23:02
|
Goto Forum:
Current Time: Mon May 06 23:51:58 CEST 2024
Total time taken to generate the page: 0.03669 seconds
|