User forums > Nightly builds

The 20 February 2011 build (7017) is out.

<< < (7/11) > >>

Jenna:

--- Quote from: oBFusCATed on March 08, 2011, 10:07:18 am ---OK, I'll test tonight, but I prefer the style to be in separate file.
I had an idea to show it to the wx guys, so it can be included in wxGTK, by default.
But I'm lacking the motivation to talk to them:)

--- End quote ---
I put it into the notebookstyles.{cpp|h} files to keep it consistent with the other two styles we already have.
It would possibly make sense to put the styles in own files inside a subfolder, to make it easier to add new (community-generated ?) styles, without littering the src-folder .

jccddd:
If change the notebook tab style to "default" ,the problem's gone.It shows up when the tab style is changed to visual studio 7.1.

oBFusCATed:
Jens: Can you apply your changes over my patch, so I can see what you've changed (no naming changes please, for now at least)...
Also you've lost the Makefile.am changes...

Jenna:

--- Quote from: oBFusCATed on March 08, 2011, 09:40:34 pm ---Jens: Can you apply your changes over my patch, so I can see what you've changed (no naming changes please, for now at least)...
Also you've lost the Makefile.am changes...

--- End quote ---
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.

The main changes:

* I removed 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.
* I fetch the actual close-icon from stock and rescale it if necessary to the wanted size (16x16)
* 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
* I removed completely GetTabSize
* I use m_normal_font as measuring-font in GetBestTabCtrlSize()
* 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
* I changed ArrowStateAndShadow() to return values for disabled, hovered, pressed and normal buttons, according to the way it is done in by gtk
* I use nullptr instead of NULL, wherever it is possible
* 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
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).

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.

oBFusCATed:
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.


--- Quote from: jens on March 08, 2011, 10:56:16 pm ---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.

--- End quote ---
There are many irrelevant changes, so it is hard to follow :(


--- Quote from: jens on March 08, 2011, 10:56:16 pm ---The main changes:
1.I removed 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]

--- End quote ---
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


--- Quote from: jens on March 08, 2011, 10:56:16 pm ---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).

--- End quote ---
This seems to work, probably you can apply it separately...


--- Quote from: jens on March 08, 2011, 10:56:16 pm ---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.

--- End quote ---
OK, my auto-fu is very low...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version