But my comment is still regarded as spam...
Some of my posts are also regarde as spam, especially if they contain many quotes.
Yours is approved now.
If that happens you can send me or another admin a PM.
Okay, you've broken my theme -> http://smrt.is-a-geek.org/codeblocks/screens/cb_gtk_tool_breakage.png
On the second row is the working version with my patch, forth row is screenshot from pidgin.
I attach two diffs, one for the header and one for the cpp file.
The diffs compare only the relevant part of the notebokstyles.{h|cpp} files with your files.
There are many irrelevant changes, so it is hard to follow
The main changes:
GetIcon() and m_close_icon completely, because wxGTK seems not to update the "gtk-close" icon if the theme is changed, only on program startup.[/li][/list]
2.I fetch the actual close-icon from stock and rescale it if necessary to the wanted size (16x16)[/li][/list]
3.The wanted close-icon-size is set as static variable, I also added a setter-function to change the size, but it is actually not used[/li][/list]
4.I removed completely GetTabSize[/li][/list]
5.I use m_normal_font as measuring-font in GetBestTabCtrlSize()[/li][/list]
6.I always use normal font (for all tabs as gtk seems to do it), a better approach would surely be to get the actual notebook-font from gtk if possible[/li][/list]
7.I changed ArrowStateAndShadow() to return values for disabled, hovered, pressed and normal buttons, according to the way it is done in by gtk[/li][/list]
8.I use nullptr instead of NULL, wherever it is possible[/li][/list]
9.I overwork DrawTab() at many places to create tabs with different height for normal and selected tabs, to fetch the actual close-button from gtk-stock, to draw a focus-rect and to place the bitmap and the label[/li]
[/list]
1. Probably this should be fixed in the wxGTK, not workarounded?
4. Why?
5. Why, too?
8. Don't do it please, the main idea was to prepare this for inclusion in wxGTK, not distributed in C::B
9. Seems broken with my theme -> Darkilouche
To fix the issue with not correctly applied/used TabArtProvider, I use target->SetTabCtrlHeight(0); before applying the new ArtProvider and target->SetTabCtrlHeight(-1); after applying it. Doing so seems to fix the issue (at least here).
This seems to work, probably you can apply it separately...
The automake-stuff will come with my next patch, it was not on top of my priority list.
I do not use your GTK2 test from configure.in, because we already test for it some lines later, I just remove the if-xlause around the test, as we need it for C::B's core now.
OK, my auto-fu is very low...
1. Surely, but it is not yet fixed and it might take a while until this happens (probably never). Sometimes it takes very long until fixes like this will be accepted or it never happens, but it is aminor issue, because changing the icon-theme while C::B is running will not happen so often.
4. Because there is no need to derive it.
5. because of 6. The measuring-font is by default
m_selected_font and it is a bold-font, but as far as I have seen all gtk-themes use normal fonts for the tab-labels, if a bold-font is used for measuring, but a normal one is efectively used, the tab-size is too large for the active tab.
8. Just replace all nullptr's with NULL and it is done. I think it's a great enhancement for C::B to use the "real" gtk-theme for the notebooks (if selected) and until it is in wxWidgets, I like to have it in C::B (and as implied in 1. it sometimes take very much time until new things make it into wxWidgets). And I prefer to use nullptr instead of NULL for uninitialized pointers.
9. Should be fixed with the new patch.
The broken theme should be fixed with the new patch (incorrect calculation of texty).