Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-8652

Disabled tabs have a pure blue background in CodeBlocks

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Fix Version/s: 0.4.0
    • Component/s: Win32SS
    • Labels:
      None

      Description

      I've been researching for a bit, and looks like (unsurprisingly) Code::Blocks uses the wxWidgets library.

      More specifically, it makes use of the `wxAuiNotebook` widget, part of the wxAui sub-library, for displaying movable/stackable tabs and panels.

      Then there's `wxAuiTabArt`, a base class for providing various pluggable back-ends/sub-classes.
      Code::Blocks makes use of the `wxAuiDefaultTabArt` back-end for drawing the tabs, which gives that characteristic wxWidgets-y feel to the application... and in the case of ReactOS, a nice `#0000ff` color in the lower part of the disabled tabs surface.

      That's where the problematic interfacing code resides. I'll keep investigating.

      References:
      http://wiki.wxwidgets.org/WxAUI
      http://docs.wxwidgets.org/trunk/classwx_aui_notebook.html
      http://docs.wxwidgets.org/trunk/classwx_aui_tab_art.html
      http://docs.wxwidgets.org/trunk/classwx_aui_default_tab_art.html

      CodeBlocks main window source code, search for `wxAuiTabArt`:
      http://svn.code.sf.net/p/codeblocks/code/trunk/src/src/main.cpp

      Here's the culprit, the code that draws the background tab gradient when disabled. I've yet to see from where that coloring comes from:
      https://github.com/wxWidgets/wxWidgets/blob/c7f1a920b1aeaa6760da4c99fd533ee01d5081b8/src/aui/tabart.cpp#L451

      Here's the Windows implementation of `GradientFillLinear`. Something's fishy over there, I don't like the way they calc the vertices' indexes:
      https://github.com/wxWidgets/wxWidgets/blob/df13791078f107edda80f50f1ab498ad936ff069/src/msw/dc.cpp#L2844

        Attachments

          Activity

            People

            • Assignee:
              hbelusca hbelusca
              Reporter:
              Swyter Swyter
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: