Hi all,
I worked a little with close tab buttons, and I've made a little widget (based on gnome-terminal's code) and a demo.
The default behaviour is the same as gnome-terminal. A try could be to remove the +2 at line 112 of geanyclosetabbutton.c to reduce tab height and get back some tab's top decorations with some themes. In the other hand, then border of the icon could cross the button's border. Next thing is to try this under Windows. If any of you could easily compile and test it under Windows, do it, please.
Any comment? If you think it is a good solution, I can try to make a patch to use it or a derivate in Geany.
Regards, Colomban
Colomban Wendling a écrit :
Hi all,
I worked a little with close tab buttons, and I've made a little widget (based on gnome-terminal's code) and a demo.
The default behaviour is the same as gnome-terminal. A try could be to remove the +2 at line 112 of geanyclosetabbutton.c to reduce tab height and get back some tab's top decorations with some themes. In the other hand, then border of the icon could cross the button's border. Next thing is to try this under Windows. If any of you could easily compile and test it under Windows, do it, please.
Any comment? If you think it is a good solution, I can try to make a patch to use it or a derivate in Geany.
Regards, Colomban
I've tried my demo under Windows (XP), and it works well, no cropping with both default and Windows GTK+ themes. But if I remove the +2's the images are cropped (but lesser than with 0.15). Finally, the tabs are 2 pixel taller than 0.15 ones with +2's and had the same height than 0.15 without.
I think it is a reasonable compromise between tab height and portability.
Regards, Colomban
PS: I can't try with Windows Vista. If anyone tries with it, let me know what it is about.
On Thu, 27 Nov 2008 23:46:02 +0100, Colomban Wendling ban-ubuntu@club-internet.fr wrote:
Colomban Wendling a écrit :
Hi all,
I worked a little with close tab buttons, and I've made a little widget (based on gnome-terminal's code) and a demo.
The default behaviour is the same as gnome-terminal. A try could be to remove the +2 at line 112 of geanyclosetabbutton.c to reduce tab height and get back some tab's top decorations with some themes. In the other hand, then border of the icon could cross the button's border. Next thing is to try this under Windows. If any of you could easily compile and test it under Windows, do it, please.
Any comment? If you think it is a good solution, I can try to make a patch to use it or a derivate in Geany.
Regards, Colomban
I've tried my demo under Windows (XP), and it works well, no cropping with both default and Windows GTK+ themes. But if I remove the +2's the images are cropped (but lesser than with 0.15). Finally, the tabs are 2 pixel taller than 0.15 ones with +2's and had the same height than 0.15 without.
I think it is a reasonable compromise between tab height and portability.
Yes. For me this is fine. I just committed some changes based on your code. Tested Linux with GTK 2.14 with the Human theme (this one which is included in Debian) and with my own theme based on some Clearlooks theme. Also tested on Windows 2000 with GTK 2.14 and the Windows theme, bundled with GTK. And everything looks fine now. I hope it will also work for Nick and others.
(I made the changes in src/notebook.c, I think there is no need (yet) to subclass GtkButton.)
Regards, Enrico
Enrico Tröger a écrit :
(I made the changes in src/notebook.c, I think there is no need (yet) to subclass GtkButton.)
True, I'm just used to subclass ^^
But your code has a defect: if the user switch theme to one using different icon size while Geany is running, the tab close buttons are not resized (try with "big size" Gnome themes f.e.). Seems simply miss style_set handlers I think.
Regards, Colomban
PS: I see the icons in the tag list are affected too, even if it part of another leak.
Am Samstag, den 29.11.2008, 13:41 +0100 schrieb Enrico Tröger:
On Thu, 27 Nov 2008 23:46:02 +0100, Colomban Wendling ban-ubuntu@club-internet.fr wrote:
Colomban Wendling a écrit :
Hi all,
I worked a little with close tab buttons, and I've made a little widget (based on gnome-terminal's code) and a demo.
The default behaviour is the same as gnome-terminal. A try could be to remove the +2 at line 112 of geanyclosetabbutton.c to reduce tab height and get back some tab's top decorations with some themes. In the other hand, then border of the icon could cross the button's border. Next thing is to try this under Windows. If any of you could easily compile and test it under Windows, do it, please.
Any comment? If you think it is a good solution, I can try to make a patch to use it or a derivate in Geany.
Regards, Colomban
I've tried my demo under Windows (XP), and it works well, no cropping with both default and Windows GTK+ themes. But if I remove the +2's the images are cropped (but lesser than with 0.15). Finally, the tabs are 2 pixel taller than 0.15 ones with +2's and had the same height than 0.15 without.
I think it is a reasonable compromise between tab height and portability.
Yes. For me this is fine. I just committed some changes based on your code. Tested Linux with GTK 2.14 with the Human theme (this one which is included in Debian) and with my own theme based on some Clearlooks theme. Also tested on Windows 2000 with GTK 2.14 and the Windows theme, bundled with GTK. And everything looks fine now. I hope it will also work for Nick and others.
Looks very nice here now, yes. :)
(I made the changes in src/notebook.c, I think there is no need (yet) to subclass GtkButton.)
Regards, Enrico
Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
Colomban Wendling a écrit :
Enrico Tröger a écrit :
(I made the changes in src/notebook.c, I think there is no need (yet) to subclass GtkButton.)
True, I'm just used to subclass ^^
But your code has a defect: if the user switch theme to one using different icon size while Geany is running, the tab close buttons are not resized (try with "big size" Gnome themes f.e.). Seems simply miss style_set handlers I think.
Regards, Colomban
PS: I see the icons in the tag list are affected too, even if it part of another leak.
Hi,
Joined a fix for the tab buttons, I'll see for tags icons soon.
Regards, Colomban
On Sat, 29 Nov 2008 17:35:08 +0100, Colomban Wendling ban-ubuntu@club-internet.fr wrote:
Colomban Wendling a écrit :
Enrico Tröger a écrit :
(I made the changes in src/notebook.c, I think there is no need (yet) to subclass GtkButton.)
True, I'm just used to subclass ^^
But your code has a defect: if the user switch theme to one using different icon size while Geany is running, the tab close buttons are not resized (try with "big size" Gnome themes f.e.). Seems simply miss style_set handlers I think.
Regards, Colomban
PS: I see the icons in the tag list are affected too, even if it part of another leak.
Hi,
Joined a fix for the tab buttons, I'll see for tags icons soon.
Cool, thanks again. I didn't think of the case when the theme is canged is that important as it probably happens rather seldom. So don't spend too much time on fixing this issue for the tags icons, there maybe more places where this can happen.
Regards, Enrico
Enrico Tröger a écrit :
I didn't think of the case when the theme is canged is that important as it probably happens rather seldom. So don't spend too much time on fixing this issue for the tags icons, there maybe more places where this can happen.
Regards, Enrico
Hum, true, and it seem harder to fix the tag list (must walk through the tree model, reload icons, etc.). I stop work on that, moreover it partially fix itself when reloading tag list (e.g. when re-saving the file or so).
Regards, Colomban
On Sat, 29 Nov 2008 18:27:22 +0100, Colomban Wendling ban-ubuntu@club-internet.fr wrote:
Enrico Tröger a écrit :
I didn't think of the case when the theme is canged is that important as it probably happens rather seldom. So don't spend too much time on fixing this issue for the tags icons, there maybe more places where this can happen.
Regards, Enrico
Hum, true, and it seem harder to fix the tag list (must walk through the tree model, reload icons, etc.). I stop work on that, moreover it partially fix itself when reloading tag list (e.g. when re-saving the file or so).
In this case I think this is completely enough.
At some point there need to be a break between having good performance and being comfortable and do everything possible.
Regards, Enrico