Author Topic: The 27 February 2010 build (6181) is out.  (Read 170903 times)

Offline GaoHan

  • Single posting newcomer
  • *
  • Posts: 3
Re: The 27 February 2010 build (6181) is out.
« Reply #75 on: April 08, 2010, 02:21:20 pm »
Small point:

If on the last empty line of a file you type the accolade, it does not add the closing accolade.

Offline foobar123

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: The 27 February 2010 build (6181) is out.
« Reply #76 on: April 08, 2010, 02:27:38 pm »
Oh, I've once tried to fix this but failed... it is added to my TODO for another try...

You mean the black text in output tabs? Well, in other places, like the status line, it's done correctly, like seen in the screenshot: The text uses the default foreground color.
To fix the output tabs, one would have to do whatever is done in the status line code to get the default text color.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: The 27 February 2010 build (6181) is out.
« Reply #77 on: April 08, 2010, 02:28:15 pm »
Small point:

If on the last empty line of a file you type the accolade, it does not add the closing accolade.
I'm not sure what you mena with accolade, but I gues you have aproblem with auto-completion of braces and quotes ( "('[{}]')" ).

This issue is already fixed in trunk and will not appear in the next release.

Offline GaoHan

  • Single posting newcomer
  • *
  • Posts: 3
Re: The 27 February 2010 build (6181) is out.
« Reply #78 on: April 08, 2010, 02:33:15 pm »
Oh, sorry, I guess it's just the dutch word for it... :) Accolade is the curly bracket thingy. Thank you for fixing!

Gao Han

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: The 27 February 2010 build (6181) is out.
« Reply #79 on: April 08, 2010, 02:35:21 pm »
You mean the black text in output tabs? Well, in other places, like the status line, it's done correctly, like seen in the screenshot: The text uses the default foreground color.
To fix the output tabs, one would have to do whatever is done in the status line code to get the default text color.
The matter is that the error lines are red, warning lines are blue and these two colors doesn't work well on black background...
Thought you're right that the normal text color should (and can easily) be fixed.

mods: can you move the post related to dark skins in another thread?
(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 foobar123

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: The 27 February 2010 build (6181) is out.
« Reply #80 on: April 08, 2010, 04:06:04 pm »
The matter is that the error lines are red, warning lines are blue and these two colors doesn't work well on black background...
Thought you're right that the normal text color should (and can easily) be fixed.

Yes, dark blue doesn't work well on dark backgrounds either, but at least it's readable. Doing this whole thing correctly would involve either making the error and warning message color configurable, or composing the colors from a mixture of the default text foreground color and the desired color. I imagine mixing 25% default text color + 75% desired color would work well.

Quote
mods: can you move the post related to dark skins in another thread?

I thought this was the right thread for discussing bugs which should be fixed before the next release. Outputting text which can't be read is a bug.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: The 27 February 2010 build (6181) is out.
« Reply #81 on: April 08, 2010, 07:06:17 pm »
Yes, dark blue doesn't work well on dark backgrounds either, but at least it's readable. Doing this whole thing correctly would involve either making the error and warning message color configurable, or composing the colors from a mixture of the default text foreground color and the desired color. I imagine mixing 25% default text color + 75% desired color would work well.
Have you used the 25% + 75% scheme somewhere?

I thought this was the right thread for discussing bugs which should be fixed before the next release. Outputting text which can't be read is a bug.
I think no, there is Preparing for Release thread. Also this is not a regression, but normal bug.
(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 foobar123

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: The 27 February 2010 build (6181) is out.
« Reply #82 on: April 09, 2010, 03:39:34 pm »
Have you used the 25% + 75% scheme somewhere?

No, it's an "educated guess" kind of thing. It might not look pretty with all color schemes but it would make the text more readable than it is now.

Offline foobar123

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: The 27 February 2010 build (6181) is out.
« Reply #83 on: April 09, 2010, 07:49:06 pm »
Text colours again.

I've created a patch which applies to current svn head. This includes [ Patch #2855 ] Dark theme fixes and also fixes the default colors for loggers like the search results. If the colour scheme is a bright-on-dark one, it also brightens the warning and error messages in the build messages, which makes them more readable (see screenshot).

I still haven't figured out how to set the colour of the notebook tabs properly - I can't find the place where the black text colour is hardcoded. This might even be in the wx libraries.

I hope this patch will be applied before the next release!

[attachment deleted by admin]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: The 27 February 2010 build (6181) is out.
« Reply #84 on: April 09, 2010, 11:22:26 pm »
I still haven't figured out how to set the colour of the notebook tabs properly - I can't find the place where the black text colour is hardcoded. This might even be in the wx libraries.

You can try this one, at least for C::B's own styles (MSVC anf FF2):
Code
--- tmp/tmpq4jmq6-meld/notebookstyles.cpp 
+++ home/jens/codeblocks-build/codeblocks.trunk/src/src/notebookstyles.cpp
@@ -155,6 +155,7 @@
         dc.SetFont(m_normal_font);
     dc.GetTextExtent(caption, &textx, &texty);
     // draw tab text
+    dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_CAPTIONTEXT));
     dc.DrawText(page.caption, text_offset,
                 drawn_tab_yoff + drawn_tab_height / 2 - texty / 2 - 1);
 
@@ -323,6 +324,7 @@
         dc.SetFont(m_normal_font);
     dc.GetTextExtent(caption, &textx, &texty);
     // draw tab text
+    dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_CAPTIONTEXT));
     dc.DrawText(page.caption, text_offset,
                 drawn_tab_yoff + drawn_tab_height / 2 - texty / 2 - 1);
 

I hope this patch will be applied before the next release!
I don't think this should be done.

First: we are in a feature freeze and only release-critical bugs should be fixed and even if it might be annoying for users of dark themes, it's not release-critical in my opinion, and any fixes should be tested long enough.

Second: I just tried the patch and after an error and the text: "Process terminated with status 1 (0 minutes, 0 seconds)" with a red background, the background of all newly added text in the Build log stays red.

debian 64 bit, svn r6202, wxWidgets 2.8.10, gcc 4.4.3


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: The 27 February 2010 build (6181) is out.
« Reply #85 on: April 09, 2010, 11:51:13 pm »
Jens: have you tried my patch, do you experience the same problem (red background) with it?
« Last Edit: April 09, 2010, 11:53:21 pm by oBFusCATed »
(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 foobar123

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: The 27 February 2010 build (6181) is out.
« Reply #86 on: April 10, 2010, 12:01:13 am »
I still haven't figured out how to set the colour of the notebook tabs properly - I can't find the place where the black text colour is hardcoded. This might even be in the wx libraries.

You can try this one, at least for C::B's own styles (MSVC anf FF2):

Thanks, I will try. I'm using the Simple Tabs style though, and I think the code for that is in the wx libraries. Anyway, that's a minor thing, the tab text is readable :)

Quote
I hope this patch will be applied before the next release!
I don't think this should be done.

First: we are in a feature freeze and only release-critical bugs should be fixed and even if it might be annoying for users of dark themes, it's not release-critical in my opinion, and any fixes should be tested long enough.

Of course it should be tested, but this is a small change, which wouldn't need a long time to test. And it's not something that changes any critical internals either, so I'd say now is as good a time to fix this than ever. I'm not a Code::Blocks developer though...

Quote
Second: I just tried the patch and after an error and the text: "Process terminated with status 1 (0 minutes, 0 seconds)" with a red background, the background of all newly added text in the Build log stays red.

debian 64 bit, svn r6202, wxWidgets 2.8.10, gcc 4.4.3

You're right, I can reproduce this. I'm attaching the patch again, this time the background colors are set correctly (loggers.cpp lines 62 and 89).

[attachment deleted by admin]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: The 27 February 2010 build (6181) is out.
« Reply #87 on: April 10, 2010, 12:03:04 am »
Jens: have you tried my patch, do you experience the same problem (red background) with it?
No (I don't like dark themes, so no need to test it until now, and really not very much time at the moment), but I already fixed the red-background issue.

Here is a snippet of the changed patch to loggers.cpp :
Code
@@ -61,12 +78,14 @@
     // might try alternatively
     //italic_font.SetStyle(wxFONTSTYLE_SLANT);
 
+    wxColour default_text_colour = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
+    wxColour default_bg_colour = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
     for(unsigned int i = 0; i < num_levels; ++i)
     {
         style[i].SetFont(default_font);
         style[i].SetAlignment(wxTEXT_ALIGNMENT_DEFAULT);
-        style[i].SetTextColour(*wxBLACK);
-        style[i].SetBackgroundColour(*wxWHITE);
+        style[i].SetBackgroundColour(default_bg_colour);
+        style[i].SetTextColour(default_text_colour);
 
         // is it necessary to do that?
         //style[i].SetFlags(...);

EDIT:
our posts crossed each other

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: The 27 February 2010 build (6181) is out.
« Reply #88 on: April 10, 2010, 12:17:20 am »
No (I don't like dark themes, so no need to test it until now, and really not very much time at the moment), but I already fixed the red-background issue.
I also don't like the extremely dark (black) themes, but gray themes are OK for me :)

Code
+    wxColour default_text_colour = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
+    wxColour default_bg_colour = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
Isn't it better to use control->GetForegroundColour()/GetBackgroundColour()?

Also your notebook patch is not OK, with my theme and ff2 style: http://smrt.is-a-geek.org/codeblocks/screens/notebook_patch_bug.png

Of course it should be tested, but this is a small change, which wouldn't need a long time to test. And it's not something that changes any critical internals either, so I'd say now is as good a time to fix this than ever. I'm not a Code::Blocks developer though...
It is not so easy to test it, because there are lots of gtk2 themes + windows xp/vista/7...
(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 foobar123

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: The 27 February 2010 build (6181) is out.
« Reply #89 on: April 10, 2010, 12:35:50 am »
Isn't it better to use control->GetForegroundColour()/GetBackgroundColour()?

Yeah it might. I wrote this quickly and I'm not familiar with wxWidgets.

Quote
Of course it should be tested, but this is a small change, which wouldn't need a long time to test. And it's not something that changes any critical internals either, so I'd say now is as good a time to fix this than ever. I'm not a Code::Blocks developer though...
It is not so easy to test it, because there are lots of gtk2 themes + windows xp/vista/7...

Ok, this might be true for the "brightening" of colors (the BlendTextColour function). But when choosing default theme colors for background and text, one can't really do anything wrong? In any case, choosing black for the foreground and leaving the background to the theme, as it was done e. g. in the search result logger, is about the worst combination one could do, no?

This article is about web pages, but I think it applies here too: "If You Pick One Color, Pick Them All" http://www.w3.org/QA/Tips/color

Maybe we could agree on using GetXgroundColor() or wxSystemSettings::GetColour() for default text in loggers for now, and find a way to create contrasting warning/error messages later? Meaning, simple Red and Blue contrast pretty much any colour, so we can leave them as they are for now. Would be a step in the right direction IMHO.

If you don't want to do this, at least force the background colors to white. Even if that hurts my eyes ;o)
« Last Edit: April 10, 2010, 12:38:27 am by foobar123 »