@@ -2942,21 +2942,27 @@ def foundCurrentVersion(self, version):
2942
2942
2943
2943
# Compare versions (alphabetical compare of version strings should work fine)
2944
2944
if info .VERSION < version :
2945
- # Add spacer and 'New Version Available' toolbar button (default hidden)
2946
- spacer = QWidget (self )
2947
- spacer .setSizePolicy (QSizePolicy .Expanding , QSizePolicy .Preferred )
2948
- self .toolBar .addWidget (spacer )
2949
-
2950
2945
# Update text for QAction
2951
2946
self .actionUpdate .setVisible (True )
2952
2947
self .actionUpdate .setText (_ ("Update Available" ))
2953
2948
self .actionUpdate .setToolTip (_ ("Update Available: <b>%s</b>" ) % version )
2954
2949
2955
- # Add update available button (with icon and text)
2956
- updateButton = QToolButton ()
2957
- updateButton .setDefaultAction (self .actionUpdate )
2958
- updateButton .setToolButtonStyle (Qt .ToolButtonTextBesideIcon )
2959
- self .toolBar .addWidget (updateButton )
2950
+ # Add toolbar button for non-cosmic dusk themes
2951
+ # Cosmic dusk has a hidden toolbar button which is made visible
2952
+ # by the setVisible() call above this
2953
+ from themes .manager import ThemeManager , ThemeName
2954
+ theme = ThemeManager ().get_current_theme ()
2955
+ if theme and theme .name != ThemeName .COSMIC .value :
2956
+ # Add spacer and 'New Version Available' toolbar button (default hidden)
2957
+ spacer = QWidget (self )
2958
+ spacer .setSizePolicy (QSizePolicy .Expanding , QSizePolicy .Preferred )
2959
+ self .toolBar .addWidget (spacer )
2960
+
2961
+ # Add update available button (with icon and text)
2962
+ updateButton = QToolButton (self )
2963
+ updateButton .setDefaultAction (self .actionUpdate )
2964
+ updateButton .setToolButtonStyle (Qt .ToolButtonTextBesideIcon )
2965
+ self .toolBar .addWidget (updateButton )
2960
2966
2961
2967
# Initialize sentry exception tracing (now that we know the current version)
2962
2968
from classes import sentry
0 commit comments