Author Topic: Code::Blocks colors  (Read 1743 times)

Offline mimi89999

  • Multiple posting newcomer
  • *
  • Posts: 45
Re: Code::Blocks colors
« Reply #15 on: April 09, 2020, 02:30:30 pm »
Sorry, but I don't quite understand what you need to do if it isn't styling. It is possible to put a label and a close button in a tab. Instead of putting a label inside the tab, a 2 element horizontal box needs to be put wit a label in the left part and a button in the right part.

I don't understand why that border width is needed.


Offline mimi89999

  • Multiple posting newcomer
  • *
  • Posts: 45
Re: Code::Blocks colors
« Reply #17 on: April 09, 2020, 03:16:14 pm »
There is also this bug on Mozilla's Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=877605

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12625
    • Travis build status
Re: Code::Blocks colors
« Reply #18 on: April 09, 2020, 04:15:43 pm »
Sorry, but I don't quite understand what you need to do if it isn't styling. It is possible to put a label and a close button in a tab. Instead of putting a label inside the tab, a 2 element horizontal box needs to be put wit a label in the left part and a button in the right part.
GTK2 contains API which says something like gtk_draw_notebook_button(...) gtk_draw_notebook_label(...) gtk_draw_notebook_border(...). All these take the notebook style from the theme and make it possible to create custom notebook which looks like the gtk_notebook control.

I couldn't find any such APIs in gtk 3 (after 1-2 hour search on the internet).
I can draw tabs in my style, I don't need any gtk APIs to do it, I can do it with wxWidgets' API. But this would mean that the style of the notebook won't match of the gtk3 notebook in native gtk apps.

Is it clear now?

p.s. Thanks for the mozilla links. They might be useful.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline mimi89999

  • Multiple posting newcomer
  • *
  • Posts: 45
Re: Code::Blocks colors
« Reply #19 on: April 09, 2020, 08:05:16 pm »
I'm not sure if it's what you need, but I made a tab with a close button. It's very ugly because I didn't set the size, but it shouldn't be an issue. Wrote it in Python3 to be faster.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12625
    • Travis build status
Re: Code::Blocks colors
« Reply #20 on: April 09, 2020, 09:19:11 pm »
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline mimi89999

  • Multiple posting newcomer
  • *
  • Posts: 45
Re: Code::Blocks colors
« Reply #21 on: April 09, 2020, 09:20:40 pm »
Yea. Probably I won't understand the issue unless I actually try to implement this.

Offline mimi89999

  • Multiple posting newcomer
  • *
  • Posts: 45
Re: Code::Blocks colors
« Reply #22 on: April 10, 2020, 12:00:39 pm »
OK. I started porting this thing to GTK3 and for the time being, I did not have any issues. Here is the WIP patch:

Offline mimi89999

  • Multiple posting newcomer
  • *
  • Posts: 45
Re: Code::Blocks colors
« Reply #23 on: April 10, 2020, 01:37:17 pm »
OK. I finally understood the issue. I also searched through the doc, but couldn't find anything. Finally, I want to #gtk and `ebassi` pointed me https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/demos/gtk-demo/foreigndrawing.c#L448-495 .

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12625
    • Travis build status
Re: Code::Blocks colors
« Reply #24 on: April 10, 2020, 07:02:10 pm »
Perseverance is key :) This might be useful, some day. Where is this #gtk channel (I suppose it is IRC)? Last time I've tried on the their IRC channel, there was no response...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline mimi89999

  • Multiple posting newcomer
  • *
  • Posts: 45
Re: Code::Blocks colors
« Reply #25 on: April 10, 2020, 08:41:00 pm »
#gtk on irc.gnome.org.

What does this mean for the `tabartgtk` implementation? Are there still any APIs missing? Will you port it? I wrote some code. Active tab doesn't have the blue bottom border, but at least I got the background correct. Tabs in GTK notebook do don't have borders nor a different background. There is a tab background change on hover and that's it. I think that some styling needs to be made in GTK notebook in C::B because without it, it will look really alien.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12625
    • Travis build status
Re: Code::Blocks colors
« Reply #26 on: April 11, 2020, 12:03:34 am »
Some day it will happen. Current plans involve improving threadsearch, after that the debugger...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Suryavarman

  • Multiple posting newcomer
  • *
  • Posts: 37
    • Suryavarman
Re: Code::Blocks colors
« Reply #27 on: April 19, 2020, 07:51:04 pm »

You can clearly see this issue on this screenshot: https://sourceforge.net/p/codeblocks/tickets/943/attachment/Capture%20d%E2%80%99%C3%A9cran%20du%202020-04-06%2008-56-33.png


I have the same problem with a fresh install of Mageia7 and C::B 17 and C::B 20.

Offline Piotr Grochowski

  • Single posting newcomer
  • *
  • Posts: 6
Re: Code::Blocks colors
« Reply #28 on: April 30, 2020, 08:06:25 pm »
Hello,
I noticed that C::B is mixing system colors with custom hard coded default colors. This makes C::B look strange/ugly on system themes with non standard color palettes and parts of the UI unusable and some text illegible on systems with a dark theme enabled or with an inverted color palette.

You can clearly see this issue on this screenshot: https://sourceforge.net/p/codeblocks/tickets/943/attachment/Capture%20d%E2%80%99%C3%A9cran%20du%202020-04-06%2008-56-33.png

https://i.imgur.com/HUQ8WdR.png
Can reproduce on Microsoft Windows but I wouldn't say it's unusable. In Microsoft Windows, there is so much software that incorrectly adapts to custom themes that I don't find this particular software surprising.