mirror of
https://github.com/onionshare/onionshare.git
synced 2025-02-10 19:58:52 -05:00
Keep setting the style to Fusion for Darwin and Windows
This commit is contained in:
parent
7af00adbc3
commit
db2122260d
@ -51,8 +51,12 @@ class Application(QtWidgets.QApplication):
|
||||
self.setDesktopFileName("org.onionshare.OnionShare")
|
||||
self.setOrganizationDomain("org.onionshare.OnionShare")
|
||||
self.setOrganizationName("OnionShare")
|
||||
|
||||
QtWidgets.QApplication.__init__(self, sys.argv)
|
||||
|
||||
if common.platform == "Darwin" or common.platform == "Windows":
|
||||
self.setStyle("Fusion")
|
||||
|
||||
# Check color mode on starting the app
|
||||
self.color_mode = self.get_color_mode(common)
|
||||
|
||||
@ -117,7 +121,9 @@ class Application(QtWidgets.QApplication):
|
||||
dark_palette.setColor(QPalette.Highlight, QColor(42, 130, 218))
|
||||
dark_palette.setColor(QPalette.HighlightedText, Qt.black)
|
||||
self.setPalette(dark_palette)
|
||||
self.setStyleSheet("QToolTip { color: #ffffff; background-color: #2a82da; border: 1px solid white; }")
|
||||
self.setStyleSheet(
|
||||
"QToolTip { color: #ffffff; background-color: #2a82da; border: 1px solid white; }"
|
||||
)
|
||||
|
||||
def get_color_mode(self, common):
|
||||
curr_settings = Settings(common)
|
||||
@ -131,6 +137,7 @@ class Application(QtWidgets.QApplication):
|
||||
else:
|
||||
return "dark" if self.is_dark_mode() else "light"
|
||||
|
||||
|
||||
def main():
|
||||
"""
|
||||
The main() function implements all of the logic that the GUI version of onionshare uses.
|
||||
|
Loading…
x
Reference in New Issue
Block a user