Author Topic: Configure dialog icon issue when clicked  (Read 12587 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Configure dialog icon issue when clicked
« Reply #15 on: April 10, 2013, 04:20:25 pm »
Just the hack in a First place would be fine and does Not affect 3rd Party plugins at all.
Hi, Morten, I don't understand this sentence, what does the "hack in a First place" mean?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Configure dialog icon issue when clicked
« Reply #16 on: April 10, 2013, 05:38:48 pm »
Hi, Morten, I don't understand this sentence, what does the "hack in a First place" mean?
I mean as a first commit it would be fair enough to just remove the hack with the de-selection. Not removing logic with changing images from coloured to b/w.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Configure dialog icon issue when clicked
« Reply #17 on: April 12, 2013, 03:29:15 am »
Hi, Morten, I don't understand this sentence, what does the "hack in a First place" mean?
I mean as a first commit it would be fair enough to just remove the hack with the de-selection. Not removing logic with changing images from coloured to b/w.
Ok, follow your advice, the patch becomes a lot simple, just remove the hack of de-selection. See below:
Code
Index: E:/code/cb/cb_trunk_sf/src/src/editorconfigurationdlg.cpp
===================================================================
--- E:/code/cb/cb_trunk_sf/src/src/editorconfigurationdlg.cpp (revision 8972)
+++ E:/code/cb/cb_trunk_sf/src/src/editorconfigurationdlg.cpp (working copy)
@@ -309,7 +309,7 @@
 void EditorConfigurationDlg::AddPluginPanels()
 {
     const wxString base = _T("images/settings/");
-    const wxString noimg = _T("images/settings/generic-plugin");
+    const wxString noimg = _T("images/settings/generic-plugin"); //for those plugins who does not supply icons
 
     wxListbook* lb = XRCCTRL(*this, "nbMain", wxListbook);
     // get all configuration panels which are about the editor.
@@ -346,12 +346,6 @@
         lb->SetPageImage(i, (i * 2) + (sel == (int)i ? 0 : 1));
     }
 
-    // the selection colour is ruining the on/off effect,
-    // so make sure no item is selected ;)
-    // (only if we have icons showing)
-    if (GetSettingsIconsStyle(lb->GetListView()) != sisNoIcons)
-        lb->GetListView()->Select(sel, false);
-
     // update the page title
     wxString label = lb->GetPageText(sel);
     // replace any stray & with && because label makes it an underscore

BTW: I see the "selection ruining " only affect on the non-transparent part of the icon. See the image shot below, the colorful icon of codecompletion is selected under Windows, but not the full icon has ruined compared with the third icon screen shot in my original post.


If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Configure dialog icon issue when clicked
« Reply #18 on: April 13, 2013, 06:09:40 pm »
BTW: I see the "selection ruining " only affect on the non-transparent part of the icon. See the image shot below, the colorful icon of codecompletion is selected under Windows, but not the full icon has ruined compared with the third icon screen shot in my original post.

Even better - go ahead then! :-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Configure dialog icon issue when clicked
« Reply #19 on: April 14, 2013, 09:36:18 am »
Done in rev8985, thanks everyone.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.