diff --git a/rare/components/dialogs/login/import_login.py b/rare/components/dialogs/login/import_login.py index 9aa4980c..b02905c4 100644 --- a/rare/components/dialogs/login/import_login.py +++ b/rare/components/dialogs/login/import_login.py @@ -54,7 +54,7 @@ class ImportLogin(QFrame): else: self.ui.status_label.setText(self.text_egl_notfound) - self.ui.prefix_tool.clicked.connect(self.prefix_path) + self.ui.prefix_button.clicked.connect(self.prefix_path) self.ui.prefix_combo.editTextChanged.connect(self.changed.emit) def get_wine_prefixes(self): diff --git a/rare/components/tabs/__init__.py b/rare/components/tabs/__init__.py index a959c2d7..20fa6633 100644 --- a/rare/components/tabs/__init__.py +++ b/rare/components/tabs/__init__.py @@ -2,7 +2,7 @@ from PyQt5.QtCore import QSize, pyqtSignal, pyqtSlot from PyQt5.QtWidgets import QMenu, QTabWidget, QWidget, QWidgetAction, QShortcut, QMessageBox from rare.shared import RareCore, LegendaryCoreSingleton, GlobalSignalsSingleton, ArgumentsSingleton -from rare.utils.misc import icon, ExitCodes +from rare.utils.misc import qta_icon, ExitCodes from .account import AccountWidget from .downloads import DownloadsTab from .games import GamesTab @@ -18,6 +18,7 @@ class MainTabWidget(QTabWidget): def __init__(self, parent): super(MainTabWidget, self).__init__(parent=parent) + self.rcore = RareCore.instance() self.core = LegendaryCoreSingleton() self.signals = GlobalSignalsSingleton() @@ -47,29 +48,29 @@ class MainTabWidget(QTabWidget): self.setTabEnabled(space_index, False) self.tab_bar.expanded = space_index # Button - button_index = self.addTab(QWidget(self), "") + button_index = self.addTab(QWidget(self), qta_icon("mdi.account-circle", fallback="fa.user"), "") self.setTabEnabled(button_index, False) self.account_widget = AccountWidget(self) self.account_widget.exit_app.connect(self.__on_exit_app) account_action = QWidgetAction(self) account_action.setDefaultWidget(self.account_widget) - account_button = TabButtonWidget("mdi.account-circle", "Account", fallback_icon="fa.user") - account_button.setMenu(QMenu()) - account_button.menu().addAction(account_action) + account_button = TabButtonWidget(qta_icon("mdi.menu", fallback="fa.align-justify"), tooltip="Menu") + account_menu = QMenu(account_button) + account_menu.addAction(account_action) + account_button.setMenu(account_menu) self.tab_bar.setTabButton( button_index, MainTabBar.RightSide, account_button ) self.settings_tab = SettingsTab(self) - self.settings_index = self.addTab(self.settings_tab, icon("fa.gear"), "") + self.settings_index = self.addTab(self.settings_tab, qta_icon("fa.gear"), "") self.settings_tab.about.update_available_ready.connect( lambda: self.tab_bar.setTabText(self.settings_index, "(!)") ) # Open game list on click on Games tab button self.tabBarClicked.connect(self.mouse_clicked) - self.setIconSize(QSize(24, 24)) # shortcuts QShortcut("Alt+1", self).activated.connect(lambda: self.setCurrentIndex(self.games_index)) diff --git a/rare/components/tabs/games/head_bar.py b/rare/components/tabs/games/head_bar.py index e0fbfb36..c000e994 100644 --- a/rare/components/tabs/games/head_bar.py +++ b/rare/components/tabs/games/head_bar.py @@ -5,7 +5,6 @@ from PyQt5.QtWidgets import ( QWidget, QHBoxLayout, QComboBox, - QToolButton, QMenu, QAction, QSpacerItem, QSizePolicy, ) @@ -99,10 +98,9 @@ class GameListHeadBar(QWidget): integrations_menu.addAction(egl_sync_action) integrations_menu.addAction(eos_ubisoft_action) - integrations = QToolButton(parent=self) + integrations = QPushButton(parent=self) integrations.setText(self.tr("Integrations")) integrations.setMenu(integrations_menu) - integrations.setPopupMode(QToolButton.InstantPopup) self.search_bar = ButtonLineEdit("fa.search", placeholder_text=self.tr("Search")) self.search_bar.setSizePolicy(QSizePolicy.Maximum, QSizePolicy.Preferred) @@ -130,7 +128,7 @@ class GameListHeadBar(QWidget): self.refresh_list.clicked.connect(self.__refresh_clicked) layout = QHBoxLayout(self) - layout.setContentsMargins(0, 5, 0, 5) + layout.setContentsMargins(0, 0, 0, 0) layout.addWidget(self.filter) layout.addWidget(self.order) layout.addSpacerItem(QSpacerItem(0, 0, QSizePolicy.Expanding, QSizePolicy.Fixed)) diff --git a/rare/components/tabs/games/integrations/egl_sync_group.py b/rare/components/tabs/games/integrations/egl_sync_group.py index 531d2a4d..f2478bfe 100644 --- a/rare/components/tabs/games/integrations/egl_sync_group.py +++ b/rare/components/tabs/games/integrations/egl_sync_group.py @@ -46,7 +46,6 @@ class EGLSyncGroup(QGroupBox): ) self.egl_path_info = ElideLabel(parent=self) - self.egl_path_info.setProperty("infoLabel", 1) self.ui.egl_sync_layout.setWidget( self.ui.egl_sync_layout.getWidgetPosition(self.ui.egl_path_info_label)[0], QFormLayout.FieldRole, self.egl_path_info diff --git a/rare/components/tabs/settings/widgets/wrappers.py b/rare/components/tabs/settings/widgets/wrappers.py index b226b3dc..b508bf33 100644 --- a/rare/components/tabs/settings/widgets/wrappers.py +++ b/rare/components/tabs/settings/widgets/wrappers.py @@ -15,7 +15,6 @@ from PyQt5.QtWidgets import ( QWidget, QScrollArea, QAction, - QToolButton, QMenu, QStackedWidget, QPushButton, QLineEdit, QVBoxLayout, QComboBox, ) @@ -118,10 +117,9 @@ class WrapperWidget(QFrame): manage_menu = QMenu(parent=self) manage_menu.addActions([edit_action, delete_action]) - manage_button = QToolButton(parent=self) - manage_button.setIcon(qta_icon("mdi.menu")) + manage_button = QPushButton(parent=self) + manage_button.setIcon(qta_icon("mdi.menu", fallback="fa.align-justify")) manage_button.setMenu(manage_menu) - manage_button.setPopupMode(QToolButton.InstantPopup) manage_button.setEnabled(wrapper.is_editable) if not wrapper.is_editable: manage_button.setToolTip(self.tr("Manage through settings")) diff --git a/rare/components/tabs/store/game_info.py b/rare/components/tabs/store/game_info.py index 65045040..263f91e9 100644 --- a/rare/components/tabs/store/game_info.py +++ b/rare/components/tabs/store/game_info.py @@ -17,7 +17,7 @@ from rare.components.tabs.store.shop_models import ShopGame from rare.shared import LegendaryCoreSingleton from rare.ui.components.tabs.store.shop_game_info import Ui_shop_info from rare.utils.extra_widgets import ImageLabel -from rare.utils.misc import icon +from rare.utils.misc import qta_icon as icon from rare.widgets.loading_widget import LoadingWidget logger = logging.getLogger("ShopInfo") diff --git a/rare/components/tabs/store/game_widgets.py b/rare/components/tabs/store/game_widgets.py index 7cc2c1f8..8085965b 100644 --- a/rare/components/tabs/store/game_widgets.py +++ b/rare/components/tabs/store/game_widgets.py @@ -9,7 +9,7 @@ from PyQt5.QtWidgets import QWidget, QVBoxLayout, QLabel, QHBoxLayout from rare.components.tabs.store.shop_models import ImageUrlModel from rare.ui.components.tabs.store.wishlist_widget import Ui_WishlistWidget from rare.utils.extra_widgets import ImageLabel -from rare.utils.misc import icon +from rare.utils.misc import qta_icon as icon logger = logging.getLogger("GameWidgets") diff --git a/rare/components/tabs/store/wishlist.py b/rare/components/tabs/store/wishlist.py index 140ad8ad..fbac0713 100644 --- a/rare/components/tabs/store/wishlist.py +++ b/rare/components/tabs/store/wishlist.py @@ -5,7 +5,7 @@ from rare.components.tabs.store import ShopApiCore from rare.components.tabs.store.game_widgets import WishlistWidget from rare.ui.components.tabs.store.wishlist import Ui_Wishlist from rare.utils.extra_widgets import WaitingSpinner -from rare.utils.misc import icon +from rare.utils.misc import qta_icon as icon class Wishlist(QStackedWidget, Ui_Wishlist): diff --git a/rare/components/tabs/tab_widgets.py b/rare/components/tabs/tab_widgets.py index b3212fb4..dfa01d8c 100644 --- a/rare/components/tabs/tab_widgets.py +++ b/rare/components/tabs/tab_widgets.py @@ -1,15 +1,13 @@ -from PyQt5.QtCore import QSize -from PyQt5.QtWidgets import QTabBar, QToolButton - -from rare.utils.misc import icon +from PyQt5.QtGui import QIcon +from PyQt5.QtWidgets import QTabBar, QSizePolicy, QPushButton class MainTabBar(QTabBar): def __init__(self, parent=None): super(MainTabBar, self).__init__(parent=parent) - self.setObjectName("MainTabBar") + self.setObjectName(type(self).__name__) font = self.font() - font.setPointSize(font.pointSize() + 2) + font.setPointSize(font.pointSize() + 1) font.setBold(True) self.setFont(font) self.expanded = -1 @@ -24,11 +22,9 @@ class MainTabBar(QTabBar): return size -class TabButtonWidget(QToolButton): - def __init__(self, button_icon: str, tool_tip: str, fallback_icon=None, parent=None): +class TabButtonWidget(QPushButton): + def __init__(self, icon: QIcon, tooltip: str = "", parent=None): super(TabButtonWidget, self).__init__(parent=parent) - self.setText("Icon") - self.setPopupMode(QToolButton.InstantPopup) - self.setIcon(icon(button_icon, fallback_icon, scale_factor=1.25)) - self.setToolTip(tool_tip) - self.setIconSize(QSize(25, 25)) + self.setObjectName(type(self).__name__) + self.setIcon(icon) + self.setToolTip(tooltip) diff --git a/rare/resources/static_css/__init__.py b/rare/resources/static_css/__init__.py index 70c3b962..82dc3338 100644 Binary files a/rare/resources/static_css/__init__.py and b/rare/resources/static_css/__init__.py differ diff --git a/rare/resources/static_css/stylesheet.py b/rare/resources/static_css/stylesheet.py index 099886b1..551826e7 100644 --- a/rare/resources/static_css/stylesheet.py +++ b/rare/resources/static_css/stylesheet.py @@ -5,7 +5,7 @@ from typing import Union, Type import qstylizer.style from PyQt5.QtCore import QDir, QObject from PyQt5.QtGui import QColor -from PyQt5.pyrcc import RCCResourceLibrary, CONSTANT_COMPRESSLEVEL_DEFAULT, CONSTANT_COMPRESSTHRESHOLD_DEFAULT +from PyQt5.pyrcc import RCCResourceLibrary, CONSTANT_COMPRESSTHRESHOLD_DEFAULT from PyQt5.sip import wrappertype from rare.utils.misc import widget_object_name @@ -64,6 +64,13 @@ def css_name(widget: Union[wrappertype, QObject, Type], subwidget: str = ""): css = qstylizer.style.StyleSheet() +# InfoLabel +css.QLabel["#InfoLabel"].setValues( + color="#999", + fontStyle="italic", + fontWeight="normal", +) + # [Un]InstallButton css.QPushButton["#InstallButton"].setValues( borderColor=QColor(0, 180, 0).name(), @@ -197,6 +204,15 @@ css.QPushButton[css_name(SelectViewWidget, "Button")].setValues( ) +# ButtonLineEdit +from rare.utils.extra_widgets import ButtonLineEdit +css.QPushButton[css_name(ButtonLineEdit, "Button")].setValues( + backgroundColor="transparent", + border="0px", + padding="0px", +) + + if __name__ == "__main__": with open("stylesheet.qss", "w") as qss: qss.write(f'\n/* This file is auto-generated from "{os.path.basename(__file__)}". DO NOT EDIT!!! */\n\n') diff --git a/rare/resources/static_css/stylesheet.qss b/rare/resources/static_css/stylesheet.qss index 4b74aebd..051a419d 100644 --- a/rare/resources/static_css/stylesheet.qss +++ b/rare/resources/static_css/stylesheet.qss @@ -1,6 +1,11 @@ /* This file is auto-generated from "stylesheet.py". DO NOT EDIT!!! */ +QLabel#InfoLabel { + color: #999; + font-style: italic; + font-weight: normal; +} QPushButton#InstallButton { border-color: #00b400; background-color: #007800; @@ -106,3 +111,8 @@ QPushButton#SelectViewWidgetButton { border: none; background-color: transparent; } +QPushButton#ButtonLineEditButton { + background-color: transparent; + border: 0px; + padding: 0px; +} diff --git a/rare/resources/stylesheets/ChildOfMetropolis/__init__.py b/rare/resources/stylesheets/ChildOfMetropolis/__init__.py index 990d81d1..592d3dda 100644 Binary files a/rare/resources/stylesheets/ChildOfMetropolis/__init__.py and b/rare/resources/stylesheets/ChildOfMetropolis/__init__.py differ diff --git a/rare/resources/stylesheets/ChildOfMetropolis/stylesheet.qss b/rare/resources/stylesheets/ChildOfMetropolis/stylesheet.qss index 1cfc9718..d9ea0f3a 100644 --- a/rare/resources/stylesheets/ChildOfMetropolis/stylesheet.qss +++ b/rare/resources/stylesheets/ChildOfMetropolis/stylesheet.qss @@ -20,7 +20,6 @@ disabled: #43474d #767778 -- border for disabled widgets alternate: #3c3f41 #A3DAAA -- border color for gradient backgrounds on widgets like Tabs and Popups [Special] -info-normal: #bbb #4D5059 -- infoLabel install-normal: #070 #F9A7FF -- install install-hover: #050 #BB7DBF -- install install-disabled: #020 #7D5380 -- install @@ -48,12 +47,6 @@ QLabel:disabled { padding: 0px; selection-background-color: #71DA7E; } -QLabel[infoLabel="1"] { - color: #4D5059; - font-style: italic; - font-weight: normal; -} - QMenu, QListView, @@ -101,6 +94,7 @@ QScrollBar { background-color: #DADDDE; selection-background-color: #71DA7E; } + QLineEdit, QTextEdit, QTimeEdit, @@ -111,11 +105,22 @@ QSpinBox, QDoubleSpinBox, QProgressBar, QPushButton { - height: 1.30em; + min-height: 1.30em; +} +QLineEdit, +QTextEdit +QTimeEdit, +QDateEdit, +QDateTimeEdit, +QSpinBox, +QDoubleSpinBox, +QProgressBar { + max-height: 1.30em; } QToolButton { - height: 1.10em; + min-height: 1.10em; } + QFrame[frameShape="0"] { border-width: 0px; } @@ -314,12 +319,15 @@ QToolButton { padding-left: 6px; padding-right: 6px; } -QPushButton::menu-indicator { +/* +QPushButton::menu-indicator, +QToolButton::menu-indicator { subcontrol-position: right center; subcontrol-origin: padding; left: -2px; border-style: none; } +*/ QGroupBox, QCheckBox, @@ -451,12 +459,6 @@ QSizeGrip { height: 4px; } -QLineEdit#SearchBar { - padding: 3px; - border-radius: 5px; - background-color: #DADDDE; -} - QTabWidget::pane { } QTabWidget::tab-bar { @@ -610,6 +612,39 @@ QTabBar::tab:right:selected:disabled { border-left-color: transparent; } +QStatusBar { + border-width: 1px; + border-style: solid; + border-color: transparent; + border-top-color: #5CD3FF; + border-bottom-color: #A3DAAA; + background: qlineargradient( + x1: 0, y1: 3, + x2: 0, y2: 0, + stop: 0 #A3DAAA, + stop: 1 #C2C4C5); +} + +QToolTip { + border-width: 1px; + border-style: solid; + border-color: #5CD3FF; + border-radius: 4px; + padding: 1px; + opacity: 200; +} + +QBalloonTip { + color: #36393F; + background-color: #C2C4C5; + border-width: 1px; + border-style: solid; + border-color: #5CD3FF; + border-radius: 4px; + padding: 1px; +} + +/* Main tab bar styling */ QTabBar#MainTabBar { border-width: 1px; border-style: solid; @@ -651,6 +686,17 @@ QTabBar#MainTabBar::tab:top:selected { border-color: #5CD3FF; border-bottom-color: #C2C4C5; } +QPushButton#TabButtonWidget, +QToolButton#TabButtonWidget { + padding: 0px; + border-color: rgb( 51, 54, 59); +} +QPushButton#TabButtonWidget:disabled, +QToolButton#TabButtonWidget:disabled { + border-color: rgb( 41, 43, 47); +} + +/* Side tab bar styling */ QTabBar#SideTabBar { border-width: 1px; border-style: solid; @@ -688,36 +734,10 @@ QTabBar#SideTabBar::tab:disabled { background-color: transparent; } -QStatusBar { - border-width: 1px; - border-style: solid; - border-color: transparent; - border-top-color: #5CD3FF; - border-bottom-color: #A3DAAA; - background: qlineargradient( - x1: 0, y1: 3, - x2: 0, y2: 0, - stop: 0 #A3DAAA, - stop: 1 #C2C4C5); -} - -QToolTip { - border-width: 1px; - border-style: solid; - border-color: #5CD3FF; - border-radius: 4px; - padding: 1px; - opacity: 200; -} - -QBalloonTip { - color: #36393F; - background-color: #C2C4C5; - border-width: 1px; - border-style: solid; - border-color: #5CD3FF; - border-radius: 4px; - padding: 1px; +/* Search bar styling */ +QLineEdit#SearchBar { + border-radius: 5px; + background-color: #DADDDE; } /* Wrapper settings styling */ @@ -745,3 +765,7 @@ QLabel#WrapperSettingsLabel { border-color: #71DA7E; background-color: #BCBEBF; } +QLabel#WrapperSettingsLabel:disabled { + border-color: rgb( 67, 71, 77); + background-color: rgb( 32, 34, 37); +} diff --git a/rare/resources/stylesheets/RareStyle/__init__.py b/rare/resources/stylesheets/RareStyle/__init__.py index cac9ca62..cf9bfd6e 100644 Binary files a/rare/resources/stylesheets/RareStyle/__init__.py and b/rare/resources/stylesheets/RareStyle/__init__.py differ diff --git a/rare/resources/stylesheets/RareStyle/drop-down.svg b/rare/resources/stylesheets/RareStyle/drop-down.svg index 12e7c92c..80110650 100644 --- a/rare/resources/stylesheets/RareStyle/drop-down.svg +++ b/rare/resources/stylesheets/RareStyle/drop-down.svg @@ -1,4 +1,4 @@ + fill="#ccc"/> \ No newline at end of file diff --git a/rare/resources/stylesheets/RareStyle/sort-down.svg b/rare/resources/stylesheets/RareStyle/sort-down.svg index 29f5f7b6..5f9a6633 100644 --- a/rare/resources/stylesheets/RareStyle/sort-down.svg +++ b/rare/resources/stylesheets/RareStyle/sort-down.svg @@ -1,4 +1,4 @@ + fill="#ccc"/> \ No newline at end of file diff --git a/rare/resources/stylesheets/RareStyle/sort-up.svg b/rare/resources/stylesheets/RareStyle/sort-up.svg index 7a2d0ddc..4a9e3549 100644 --- a/rare/resources/stylesheets/RareStyle/sort-up.svg +++ b/rare/resources/stylesheets/RareStyle/sort-up.svg @@ -1,4 +1,4 @@ + fill="#ccc"/> \ No newline at end of file diff --git a/rare/resources/stylesheets/RareStyle/stylesheet.qss b/rare/resources/stylesheets/RareStyle/stylesheet.qss index 796d92b5..ea905143 100644 --- a/rare/resources/stylesheets/RareStyle/stylesheet.qss +++ b/rare/resources/stylesheets/RareStyle/stylesheet.qss @@ -6,7 +6,7 @@ disabled: #43474d rgb( 67, 71, 77) -- disabled font color rgba( 67, 71, 77, 25%) == rgb( 41, 43, 47) [Background] normal: #202225 rgb( 32, 34, 37) -- main background color -editable: #333344 rgb( 51, 51, 68) -- background color for reactive/editable widgets (TextEdits, ProgressBars etc) +editable: #272733 rgb( 38, 38, 51) -- background color for reactive/editable widgets (TextEdits, ProgressBars etc) hover: #222233 rgb( 34, 34, 51) -- background color when hovering over reactive widgets (Buttons, Headers) selection: #2f4f4f rgb( 47, 79, 79) -- background color for selectable widgets alternate: #282a2e rgb( 40, 42, 46) -- background color for alternating rows in List/Tree/TableViews and for ScrollBars @@ -20,7 +20,6 @@ disabled: #43474d rgb( 67, 71, 77) -- border for disabled widgets alternate: #3c3f41 rgb( 60, 63, 65) -- border color for gradient backgrounds on widgets like Tabs and Popups [Special] -info-normal: #bbb rgb(187, 187, 187) -- infoLabel install-normal: #070 rgb( 0, 119, 0) -- install install-hover: #050 rgb( 0, 85, 0) -- install install-disabled: #020 rgb( 0, 34, 0) -- install @@ -48,12 +47,6 @@ QLabel:disabled { padding: 0px; selection-background-color: rgb( 47, 79, 79); } -QLabel[infoLabel="1"] { - color: rgb(187, 187, 187); - font-style: italic; - font-weight: normal; -} - QMenu, QListView, @@ -98,9 +91,10 @@ QDoubleSpinBox, QProgressBar, QScrollBar { border-color: rgb( 47, 79, 79); - background-color: rgb( 51, 51, 68); + background-color: rgb( 38, 38, 51); selection-background-color: rgb( 47, 79, 79); } + QLineEdit, QTextEdit, QTimeEdit, @@ -111,11 +105,22 @@ QSpinBox, QDoubleSpinBox, QProgressBar, QPushButton { - height: 1.30em; + min-height: 1.30em; +} +QLineEdit, +QTextEdit +QTimeEdit, +QDateEdit, +QDateTimeEdit, +QSpinBox, +QDoubleSpinBox, +QProgressBar { + max-height: 1.30em; } QToolButton { - height: 1.10em; + min-height: 1.10em; } + QFrame[frameShape="0"] { border-width: 0px; } @@ -230,7 +235,7 @@ QScrollBar::handle { border-width: 1px; border-style: solid; border-color: rgb( 72, 61, 139); - background-color: rgb( 51, 51, 68); + background-color: rgb( 38, 38, 51); border-radius: 2px; min-height: 30px; min-width: 30px; @@ -314,12 +319,15 @@ QToolButton { padding-left: 6px; padding-right: 6px; } -QPushButton::menu-indicator { +/* +QPushButton::menu-indicator, +QToolButton::menu-indicator { subcontrol-position: right center; subcontrol-origin: padding; left: -2px; border-style: none; } +*/ QGroupBox, QCheckBox, @@ -451,12 +459,6 @@ QSizeGrip { height: 4px; } -QLineEdit#SearchBar { - padding: 3px; - border-radius: 5px; - background-color: rgb( 51, 51, 68); -} - QTabWidget::pane { } QTabWidget::tab-bar { @@ -610,6 +612,39 @@ QTabBar::tab:right:selected:disabled { border-left-color: transparent; } +QStatusBar { + border-width: 1px; + border-style: solid; + border-color: transparent; + border-top-color: rgb( 72, 61, 139); + border-bottom-color: rgb( 60, 63, 65); + background: qlineargradient( + x1: 0, y1: 3, + x2: 0, y2: 0, + stop: 0 rgb( 60, 63, 65), + stop: 1 rgb( 32, 34, 37)); +} + +QToolTip { + border-width: 1px; + border-style: solid; + border-color: rgb( 72, 61, 139); + border-radius: 4px; + padding: 1px; + opacity: 200; +} + +QBalloonTip { + color: rgb(238, 238, 238); + background-color: rgb( 32, 34, 37); + border-width: 1px; + border-style: solid; + border-color: rgb( 72, 61, 139); + border-radius: 4px; + padding: 1px; +} + +/* Main tab bar styling */ QTabBar#MainTabBar { border-width: 1px; border-style: solid; @@ -632,7 +667,7 @@ QTabBar#MainTabBar::tab { margin-right: 3px; border-top-color: transparent; border-bottom-color: rgb( 72, 61, 139); - padding: 5px; + padding: 3px 5px; }/* QTabBar#MainTabBar::tab:top:first, QTabBar#MainTabBar::tab:bottom:first { @@ -651,6 +686,17 @@ QTabBar#MainTabBar::tab:top:selected { border-color: rgb( 72, 61, 139); border-bottom-color: rgb( 32, 34, 37); } +QPushButton#TabButtonWidget, +QToolButton#TabButtonWidget { + padding: 0px; + border-color: rgb( 51, 54, 59); +} +QPushButton#TabButtonWidget:disabled, +QToolButton#TabButtonWidget:disabled { + border-color: rgb( 41, 43, 47); +} + +/* Side tab bar styling */ QTabBar#SideTabBar { border-width: 1px; border-style: solid; @@ -688,41 +734,16 @@ QTabBar#SideTabBar::tab:disabled { background-color: transparent; } -QStatusBar { - border-width: 1px; - border-style: solid; - border-color: transparent; - border-top-color: rgb( 72, 61, 139); - border-bottom-color: rgb( 60, 63, 65); - background: qlineargradient( - x1: 0, y1: 3, - x2: 0, y2: 0, - stop: 0 rgb( 60, 63, 65), - stop: 1 rgb( 32, 34, 37)); -} - -QToolTip { - border-width: 1px; - border-style: solid; - border-color: rgb( 72, 61, 139); - border-radius: 4px; - padding: 1px; - opacity: 200; -} - -QBalloonTip { - color: rgb(238, 238, 238); - background-color: rgb( 32, 34, 37); - border-width: 1px; - border-style: solid; - border-color: rgb( 72, 61, 139); - border-radius: 4px; - padding: 1px; +/* Search bar styling */ +QLineEdit#SearchBar { + border-radius: 5px; + background-color: rgb( 38, 38, 51); } /* Wrapper settings styling */ QPushButton#WrapperWidgetButton, QToolButton#WrapperWidgetButton { + padding: 0px; border-color: rgb( 51, 54, 59); } QPushButton#WrapperWidgetButton:disabled, @@ -731,7 +752,7 @@ QToolButton#WrapperWidgetButton:disabled { } QScrollArea#WrapperSettingsScroll { border-color: rgb( 47, 79, 79); - background-color: rgb( 40, 42, 46); + background-color: rgb( 38, 38, 51); } QScrollBar#WrapperSettingsScrollBar { background-color: rgb( 40, 42, 46); @@ -743,9 +764,9 @@ QLabel#WrapperSettingsLabel { padding: 2px; color: #999; border-color: rgb( 47, 79, 79); - background-color: rgb( 40, 42, 46); + background-color: rgb( 38, 38, 51); } QLabel#WrapperSettingsLabel:disabled { border-color: rgb( 67, 71, 77); background-color: rgb( 32, 34, 37); -} \ No newline at end of file +} diff --git a/rare/ui/components/dialogs/login/import_login.py b/rare/ui/components/dialogs/login/import_login.py index e6105982..277ac81f 100644 --- a/rare/ui/components/dialogs/login/import_login.py +++ b/rare/ui/components/dialogs/login/import_login.py @@ -14,7 +14,7 @@ from PyQt5 import QtCore, QtGui, QtWidgets class Ui_ImportLogin(object): def setupUi(self, ImportLogin): ImportLogin.setObjectName("ImportLogin") - ImportLogin.resize(233, 156) + ImportLogin.resize(256, 143) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) @@ -52,9 +52,9 @@ class Ui_ImportLogin(object): self.prefix_combo.setEditable(True) self.prefix_combo.setObjectName("prefix_combo") self.prefix_layout.addWidget(self.prefix_combo) - self.prefix_tool = QtWidgets.QToolButton(ImportLogin) - self.prefix_tool.setObjectName("prefix_tool") - self.prefix_layout.addWidget(self.prefix_tool) + self.prefix_button = QtWidgets.QPushButton(ImportLogin) + self.prefix_button.setObjectName("prefix_button") + self.prefix_layout.addWidget(self.prefix_button) self.prefix_layout.setStretch(0, 1) self.form_layout.setLayout(0, QtWidgets.QFormLayout.FieldRole, self.prefix_layout) self.prefix_label = QtWidgets.QLabel(ImportLogin) @@ -85,7 +85,7 @@ class Ui_ImportLogin(object): def retranslateUi(self, ImportLogin): _translate = QtCore.QCoreApplication.translate self.title_label.setText(_translate("ImportLogin", "Import existing session from EGL")) - self.prefix_tool.setText(_translate("ImportLogin", "Browse")) + self.prefix_button.setText(_translate("ImportLogin", "Browse...")) self.prefix_label.setText(_translate("ImportLogin", "Select prefix")) self.info_label.setText(_translate("ImportLogin", "Please select the Wine prefix where Epic Games Launcher is installed. You will get logged out from EGL in the process.")) diff --git a/rare/ui/components/dialogs/login/import_login.ui b/rare/ui/components/dialogs/login/import_login.ui index c396215a..f6a6f3c3 100644 --- a/rare/ui/components/dialogs/login/import_login.ui +++ b/rare/ui/components/dialogs/login/import_login.ui @@ -6,8 +6,8 @@ 0 0 - 233 - 156 + 256 + 143 @@ -69,9 +69,9 @@ - + - Browse + Browse... diff --git a/rare/ui/components/tabs/games/integrations/egl_sync_group.py b/rare/ui/components/tabs/games/integrations/egl_sync_group.py index d59c2b2a..42ce39db 100644 --- a/rare/ui/components/tabs/games/integrations/egl_sync_group.py +++ b/rare/ui/components/tabs/games/integrations/egl_sync_group.py @@ -45,7 +45,7 @@ class Ui_EGLSyncGroup(object): def retranslateUi(self, EGLSyncGroup): _translate = QtCore.QCoreApplication.translate EGLSyncGroup.setTitle(_translate("EGLSyncGroup", "Sync with Epic Games Launcher")) - self.egl_path_edit_label.setText(_translate("EGLSyncGroup", "Prefix/Manifest path")) + self.egl_path_edit_label.setText(_translate("EGLSyncGroup", "Manifest path")) self.egl_sync_check_label.setText(_translate("EGLSyncGroup", "Enable automatic sync")) self.egl_sync_check.setText(_translate("EGLSyncGroup", "This will immediately synchronize with EGL")) self.egl_path_info_label.setText(_translate("EGLSyncGroup", "Estimated path")) diff --git a/rare/ui/components/tabs/games/integrations/egl_sync_group.ui b/rare/ui/components/tabs/games/integrations/egl_sync_group.ui index 10b71aab..b01fa592 100644 --- a/rare/ui/components/tabs/games/integrations/egl_sync_group.ui +++ b/rare/ui/components/tabs/games/integrations/egl_sync_group.ui @@ -29,7 +29,7 @@ - Prefix/Manifest path + Manifest path diff --git a/rare/utils/extra_widgets.py b/rare/utils/extra_widgets.py index dfecc958..e5e9ca3d 100644 --- a/rare/utils/extra_widgets.py +++ b/rare/utils/extra_widgets.py @@ -9,10 +9,9 @@ from PyQt5.QtWidgets import ( QWidget, QPushButton, QLineEdit, - QToolButton, ) -from rare.utils.misc import icon as qta_icon +from rare.utils.misc import qta_icon from rare.utils.paths import cache_dir from rare.utils.qt_requests import QtRequests @@ -117,14 +116,12 @@ class ButtonLineEdit(QLineEdit): super(ButtonLineEdit, self).__init__(parent=parent) self.setObjectName(type(self).__name__) - self.button = QToolButton(self) + self.button = QPushButton(self) self.button.setObjectName(f"{type(self).__name__}Button") - self.button.setIcon(qta_icon(icon_name, color="white")) - self.button.setStyleSheet( - f"QToolButton#{self.button.objectName()} {{border: 0px; padding: 0px;}}" - ) + self.button.setIcon(qta_icon(icon_name)) self.button.setCursor(Qt.ArrowCursor) self.button.clicked.connect(self.buttonClicked.emit) + self.setPlaceholderText(placeholder_text) frame_width = self.style().pixelMetric(QStyle.PM_DefaultFrameWidth) button_size = self.button.sizeHint() diff --git a/rare/utils/misc.py b/rare/utils/misc.py index 1d016cf3..b630db5c 100644 --- a/rare/utils/misc.py +++ b/rare/utils/misc.py @@ -101,8 +101,9 @@ def set_color_pallete(color_scheme: str) -> None: if custom_palette is not None: qApp.setPalette(custom_palette) qApp.setStyleSheet(static) - icon_color = qApp.palette().color(QPalette.Foreground).name() - qtawesome.set_defaults(color=icon_color) + icon_color_normal = qApp.palette().color(QPalette.Foreground).name() + icon_color_disabled = qApp.palette().color(QPalette.Foreground).name() + qtawesome.set_defaults(color=icon_color_normal, color_disabled=icon_color_disabled) def get_color_schemes() -> Iterable[str]: @@ -124,8 +125,9 @@ def set_style_sheet(style_sheet: str) -> None: file.close() qApp.setStyleSheet(stylesheet + static) - icon_color = qApp.palette().color(QPalette.Text).name() - qtawesome.set_defaults(color="#eeeeee") + icon_color_normal = qApp.palette().color(QPalette.Text).name() + icon_color_disabled = qApp.palette().color(QPalette.Text).name() + qtawesome.set_defaults(color="#eee", color_disabled="#eee") def get_style_sheets() -> Iterable[str]: diff --git a/rare/widgets/indicator_edit.py b/rare/widgets/indicator_edit.py index 83c1cd6a..0255069a 100644 --- a/rare/widgets/indicator_edit.py +++ b/rare/widgets/indicator_edit.py @@ -24,7 +24,7 @@ from PyQt5.QtWidgets import ( QCompleter, QFileSystemModel, QStyledItemDelegate, - QFileIconProvider, + QFileIconProvider, QPushButton, ) from rare.utils.misc import qta_icon @@ -304,7 +304,7 @@ class PathEdit(IndicatorLineEdit): ) self.setObjectName(type(self).__name__) self.line_edit.setMinimumSize(QSize(250, 0)) - self.path_select = QToolButton(self) + self.path_select = QPushButton(self) self.path_select.setObjectName(f"{type(self).__name__}Button") layout = self.layout() layout.addWidget(self.path_select)