Uploaded image for project: 'GMAT'
  1. GMAT
  2. GMT-5907

Resource/Mission tree background not reset correctly

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: R2016a, R2017a, R2018A
    • Fix Version/s: R2018A
    • Component/s: GUI
    • Labels:
      None
    • Environment:

      CentOS 7.2.1511, wxWidgets GTK2 / MATE, BlackMATE theme

      Description

      In GMAT R2016a, certain actions can trigger the GUI to enter/leave "Advanced Mode", where the mission and resource trees are grayed-out, and only the script is edited. In the process of entering/leaving Advanced Mode, the trees' background color is changed to indicate whether they are active. The colors, as presently used, assume a "light" GUI theme, and assume that the default background color is white. This causes problems in dark GUI themes, which have white fonts on a dark background. The result is that the mission/resource trees are unreadable after loading a script file (which causes a toggle of Advanced Mode).

      Attached is a small patch to pass wxNullColour, instead of WHITE, to SetBackgroundColour in these cases. This causes the backgrounds on the mission/resource trees to be properly reset in dark GUI themes.

        Gliffy Diagrams

          Attachments

          1. after.png
            after.png
            108 kB
          2. before.png
            before.png
            70 kB
          3. treebgcolors.patch
            1 kB

            Activity

            Hide
            tgrubb Thomas Grubb added a comment -

            The fix in the GMT-5907 does NOT work. On Windows with normal GMAT theme, the background is black leaving the tree unreadable.

            Show
            tgrubb Thomas Grubb added a comment - The fix in the GMT-5907 does NOT work. On Windows with normal GMAT theme, the background is black leaving the tree unreadable.
            Hide
            bet Bryan Topp added a comment -

            Sorry about that - in this case, I don't know what a proper fix is. According to the wxWidgets docs, passing wxNullColour should result in the default background being restored:
            http://docs.wxwidgets.org/3.1/classwx_window.html

            Maybe I've misunderstood how the tree colors are being manipulated.

            Show
            bet Bryan Topp added a comment - Sorry about that - in this case, I don't know what a proper fix is. According to the wxWidgets docs, passing wxNullColour should result in the default background being restored: http://docs.wxwidgets.org/3.1/classwx_window.html Maybe I've misunderstood how the tree colors are being manipulated.
            Hide
            djcinsb Darrel Conway added a comment -

            This may be a case where we add a platform specific macro (i.e. #ifdef linux, but with the right macro for it, of course).

            CCB – assign to me, since Tom is off doing other work now, and I'll play with it a bit.

            Show
            djcinsb Darrel Conway added a comment - This may be a case where we add a platform specific macro (i.e. #ifdef linux, but with the right macro for it, of course). CCB – assign to me, since Tom is off doing other work now, and I'll play with it a bit.
            Hide
            djcinsb Darrel Conway added a comment -

            I did a bit of preliminary investigation into the issue here. It'll take a bit of work to get all the paths through the code correct for it, so I'll tackle it as time permits. (Probably in the next sprint – my dance card is pretty full for this one.)

            Show
            djcinsb Darrel Conway added a comment - I did a bit of preliminary investigation into the issue here. It'll take a bit of work to get all the paths through the code correct for it, so I'll tackle it as time permits. (Probably in the next sprint – my dance card is pretty full for this one.)

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 6 hours
                  6h
                  Remaining:
                  Remaining Estimate - 6 hours
                  6h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified