Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Information icon in File Switcher is not themed under the dark theme #9442

Closed
CAM-Gerlach opened this issue May 27, 2019 · 5 comments · Fixed by #9477
Closed

Information icon in File Switcher is not themed under the dark theme #9442

CAM-Gerlach opened this issue May 27, 2019 · 5 comments · Fixed by #9477

Comments

@CAM-Gerlach
Copy link
Member

Issue Report Checklist

Originally discussed on #8068 .

Under the dark theme, the "information" icon in the file switcher is still not themed, as seen in #8616 .

image

Versions

  • Spyder version: 4.0.0 latest master
  • Python version: 3.7.3
  • Qt version: 5.9.7
  • PyQt version: 5.9.2
  • Operating System name/version: Windows 8.1 x64

Dependencies

qdarkstyle 2.6.8
@CAM-Gerlach CAM-Gerlach added this to the v4.0beta3 milestone May 27, 2019
@CAM-Gerlach CAM-Gerlach changed the title Information icon in FIle Switcher is still not themed under the dark theme Information icon in FIle Switcher is not themed under the dark theme May 27, 2019
@dpizetta
Copy link
Contributor

dpizetta commented May 28, 2019

@CAM-Gerlach could you tell me which widget is that button? Mays is something with qdarkstyle, maybe not. Tks

Show me the code if possible. tks.

@CAM-Gerlach CAM-Gerlach changed the title Information icon in FIle Switcher is not themed under the dark theme Information icon in File Switcher is not themed under the dark theme May 28, 2019
@CAM-Gerlach
Copy link
Member Author

@dpizetta Thanks. The issue is with Spyder, by all appearances, but it should be pretty straightforward for them to resolve once they get to it.

In spyder/widgets/helperwidgets.py:

class HelperToolButton(QToolButton):
    """Subclasses QToolButton, to provide a simple tooltip on mousedown.
    """
    def __init__(self):
        QToolButton.__init__(self)
        self.setIcon(get_std_icon('MessageBoxInformation'))
        style = """
            QToolButton {
              border: 1px solid grey;
              padding:0px;
              border-radius: 2px;
              background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                  stop: 0 #f6f7fa, stop: 1 #dadbde);  
            }
            """
        self.setStyleSheet(style)

@dpizetta
Copy link
Contributor

Tks. The style is hardcoded. Try to remove this, then it will use the qtoolbutton style. If any problem still there, let me know.

        style = """
            QToolButton {
              border: 1px solid grey;
              padding:0px;
              border-radius: 2px;
              background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                  stop: 0 #f6f7fa, stop: 1 #dadbde);  
            }
            """
        self.setStyleSheet(style)

@CAM-Gerlach
Copy link
Member Author

Thanks @dpizetta , I'm sure the Spyder team will appreciate your help.

@ccordoba12
Copy link
Member

@dpizetta, thanks a lot for your help with this one!

@juanis2112, please take a look at this issue, following @dpizetta's advice. The idea is that the icon uses MAIN_FG_COLOR so that it looks white on the dark interface and black on the light one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants