Author Topic: Change colors for UI (not editor) to make work with OS theme  (Read 3851 times)

Offline BossLetsPlays

  • Single posting newcomer
  • *
  • Posts: 2
Change colors for UI (not editor) to make work with OS theme
« on: August 18, 2015, 08:43:28 pm »
For whatever reason I only enjoy coding c++ with a dark color theme, so since I'm on Windows 7 I have installed a skin using WindowBlinds by StarDock. I did this because I know codeblocks tries to use the OS theme to determine how it looks, and for the most part it worked, minus some things I had to change in settings > environment. However if you look at the screenshot at the spots where I rectangled in red, I am wondering if it is possible to change the settings for those colors in codeblocks? I have seen people use dark themes with both windows and linux and things worked correctly for them, however on both my windows and linux systems it seems not to work for me, so can someone either help me figure out how to change the settings for those parts of the UI and or find a good dark theme that works with codeblocks? The skins would need to come from http://www.wincustomize.com/explore/windowblinds

http://prntscr.com/864v8p

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Change colors for UI (not editor) to make work with OS theme
« Reply #1 on: August 18, 2015, 10:38:05 pm »
I'm having the same problem since I switched to a darker theme. The problem with the tab texts is the foreground color is taken from system colors while the background color/image is hardcoded. I don't know if a configurable solution exists but what I did was to find the piece of code that is responsible for the text color and change it inside the CB source. What I did was switch to 'Visual Studio 7.1' style in 'settings->environment->notebooks appearance->tabs style' and change line 187 & 381 in 'src/src/notebookstyles.cpp'
from:
Code: [Select]
dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT));to:
Code: [Select]
dc.SetTextForeground((page.active) ? wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT) : *wxBLACK);and rebuild.

I don't have a solution for the icons.

Offline BossLetsPlays

  • Single posting newcomer
  • *
  • Posts: 2
Re: Change colors for UI (not editor) to make work with OS theme
« Reply #2 on: August 19, 2015, 01:50:06 am »
I'm having the same problem since I switched to a darker theme. The problem with the tab texts is the foreground color is taken from system colors while the background color/image is hardcoded. I don't know if a configurable solution exists but what I did was to find the piece of code that is responsible for the text color and change it inside the CB source. What I did was switch to 'Visual Studio 7.1' style in 'settings->environment->notebooks appearance->tabs style' and change line 187 & 381 in 'src/src/notebookstyles.cpp'
from:
Code: [Select]
dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT));to:
Code: [Select]
dc.SetTextForeground((page.active) ? wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT) : *wxBLACK);and rebuild.

I don't have a solution for the icons.

Thanks! What exactly is it that the code does, because I don't really feel like rebuilding codeblocks (plus I'm just using the mingw windows pre-built version so not even sure I can)... I ask because other than the icons, just switching to use visual studio tabs seems to work just fine http://prntscr.com/868x3s

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10262
Re: Change colors for UI (not editor) to make work with OS theme
« Reply #3 on: August 19, 2015, 08:30:13 am »
@scarphin: If you change works correctly with the default theme you can post a patch and we can integrate it in svn.
<debugger plugin maintainer>
(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 scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Change colors for UI (not editor) to make work with OS theme
« Reply #4 on: August 19, 2015, 11:14:59 am »
@BossLetsPlays: The code changes the foreground color of tab text to a more readable black as seen here:
http://forums.codeblocks.org/index.php/topic,20155.msg137415.html#msg137415

@oBFusCATed: No, it won't work with the default theme but only with VS theme. I couldn't find the default theme's color configuration when I modified the code. It won't also work with bright themes as it will probably display a black on black text. In brief, it's VS style and dark themes only solution.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10262
Re: Change colors for UI (not editor) to make work with OS theme
« Reply #5 on: August 20, 2015, 12:07:44 am »
scarphin: By default theme I mean the windows default theme not the default theme for the tabs.
<debugger plugin maintainer>
(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 scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Change colors for UI (not editor) to make work with OS theme
« Reply #6 on: August 20, 2015, 01:09:47 am »
Ok my bad, but the answer is still no as stated previously.