diff --git a/rare/components/dialogs/install_dialog.py b/rare/components/dialogs/install_dialog.py
index b1250db7..9042f2ce 100644
--- a/rare/components/dialogs/install_dialog.py
+++ b/rare/components/dialogs/install_dialog.py
@@ -258,10 +258,12 @@ class InstallDialog(ActionDialog):
def action_handler(self):
self.error_box()
message = self.tr("Updating...")
+ font = self.font()
+ font.setItalic(True)
self.ui.download_size_text.setText(message)
- self.ui.download_size_text.setStyleSheet("font-style: italic; font-weight: normal")
+ self.ui.download_size_text.setFont(font)
self.ui.install_size_text.setText(message)
- self.ui.install_size_text.setStyleSheet("font-style: italic; font-weight: normal")
+ self.ui.install_size_text.setFont(font)
self.setActive(True)
self.options_changed = False
self.get_options()
@@ -309,15 +311,19 @@ class InstallDialog(ActionDialog):
download_size = download.analysis.dl_size
install_size = download.analysis.install_size
# install_size = self.dl_item.download.analysis.disk_space_delta
+ bold_font = self.font()
+ bold_font.setBold(True)
+ italic_font = self.font()
+ italic_font.setItalic(True)
if download_size or (not download_size and (download.game.is_dlc or download.repair)):
self.ui.download_size_text.setText(format_size(download_size))
- self.ui.download_size_text.setStyleSheet("font-style: normal; font-weight: bold")
+ self.ui.download_size_text.setFont(bold_font)
self.accept_button.setEnabled(not self.options_changed)
else:
- self.ui.install_size_text.setText(self.tr("Game already installed"))
- self.ui.install_size_text.setStyleSheet("font-style: italics; font-weight: normal")
+ self.ui.download_size_text.setText(self.tr("Game already installed"))
+ self.ui.download_size_text.setFont(italic_font)
self.ui.install_size_text.setText(format_size(install_size))
- self.ui.install_size_text.setStyleSheet("font-style: normal; font-weight: bold")
+ self.ui.install_size_text.setFont(bold_font)
self.action_button.setEnabled(self.options_changed)
has_prereqs = bool(download.igame.prereq_info) and not download.igame.prereq_info.get("installed", False)
if has_prereqs:
diff --git a/rare/components/tabs/downloads/__init__.py b/rare/components/tabs/downloads/__init__.py
index 57cdec38..c0d4db91 100644
--- a/rare/components/tabs/downloads/__init__.py
+++ b/rare/components/tabs/downloads/__init__.py
@@ -61,6 +61,8 @@ class DownloadsTab(QWidget):
queue_contents = QWidget(self.queue_scrollarea)
queue_contents.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
self.queue_scrollarea.setWidget(queue_contents)
+ self.queue_scrollarea.widget().setAutoFillBackground(False)
+ self.queue_scrollarea.viewport().setAutoFillBackground(False)
queue_contents_layout = QVBoxLayout(queue_contents)
queue_contents_layout.setContentsMargins(0, 0, 3, 0)
diff --git a/rare/components/tabs/downloads/download.py b/rare/components/tabs/downloads/download.py
index 91955a38..a843d0b2 100644
--- a/rare/components/tabs/downloads/download.py
+++ b/rare/components/tabs/downloads/download.py
@@ -59,11 +59,11 @@ class DownloadWidget(ImageWidget):
def paint_image_empty(self, painter: QPainter, a0: QPaintEvent) -> None:
# when pixmap object is not available yet, show a gray rectangle
painter.setOpacity(0.5 * self._opacity)
- painter.fillRect(a0.rect(), self.palette().color(QPalette.Background))
+ painter.fillRect(a0.rect(), self.palette().color(QPalette.Window))
def paint_image_cover(self, painter: QPainter, a0: QPaintEvent) -> None:
painter.setOpacity(self._opacity)
- color = self.palette().color(QPalette.Background).darker(75)
+ color = self.palette().color(QPalette.Window).darker(75)
painter.fillRect(self.rect(), color)
brush = QBrush(self._pixmap)
brush.setTransform(self._transform)
diff --git a/rare/components/tabs/games/game_widgets/list_game_widget.py b/rare/components/tabs/games/game_widgets/list_game_widget.py
index e6832388..151713ab 100644
--- a/rare/components/tabs/games/game_widgets/list_game_widget.py
+++ b/rare/components/tabs/games/game_widgets/list_game_widget.py
@@ -99,7 +99,7 @@ class ListGameWidget(GameWidget):
def paint_image_cover(self, painter: QPainter, a0: QPaintEvent) -> None:
painter.setOpacity(self._opacity)
- color = self.palette().color(QPalette.Background).darker(75)
+ color = self.palette().color(QPalette.Window).darker(75)
painter.fillRect(self.rect(), color)
brush = QBrush(self._pixmap)
brush.setTransform(self._transform)
diff --git a/rare/components/tabs/settings/__init__.py b/rare/components/tabs/settings/__init__.py
index 41db9cf2..8b9c63f7 100644
--- a/rare/components/tabs/settings/__init__.py
+++ b/rare/components/tabs/settings/__init__.py
@@ -22,12 +22,14 @@ class SettingsTab(SideTabWidget):
self.settings_index = self.addTab(game_settings, self.tr("Defaults"))
self.about = About(self)
- self.about_index = self.addTab(self.about, "About", "About")
+ title = self.tr("About")
+ self.about_index = self.addTab(self.about, title, title)
self.about.update_available_ready.connect(
lambda: self.tabBar().setTabText(self.about_index, "About (!)")
)
if self.args.debug:
- self.debug_index = self.addTab(DebugSettings(self), "Debug")
+ title = self.tr("Debug")
+ self.debug_index = self.addTab(DebugSettings(self), title, title)
self.setCurrentIndex(self.rare_index)
diff --git a/rare/components/tabs/settings/widgets/wrappers.py b/rare/components/tabs/settings/widgets/wrappers.py
index b508bf33..a4f70eb1 100644
--- a/rare/components/tabs/settings/widgets/wrappers.py
+++ b/rare/components/tabs/settings/widgets/wrappers.py
@@ -4,8 +4,17 @@ import shutil
from logging import getLogger
from typing import Optional, Tuple, Iterable
-from PyQt5.QtCore import pyqtSignal, QSize, Qt, QMimeData, pyqtSlot
-from PyQt5.QtGui import QDrag, QDropEvent, QDragEnterEvent, QDragMoveEvent, QFont, QMouseEvent, QShowEvent
+from PyQt5.QtCore import pyqtSignal, QSize, Qt, QMimeData, pyqtSlot, QObject, QEvent
+from PyQt5.QtGui import (
+ QDrag,
+ QDropEvent,
+ QDragEnterEvent,
+ QDragMoveEvent,
+ QFont,
+ QMouseEvent,
+ QShowEvent,
+ QResizeEvent,
+)
from PyQt5.QtWidgets import (
QHBoxLayout,
QLabel,
@@ -15,7 +24,11 @@ from PyQt5.QtWidgets import (
QWidget,
QScrollArea,
QAction,
- QMenu, QStackedWidget, QPushButton, QLineEdit, QVBoxLayout, QComboBox,
+ QMenu,
+ QPushButton,
+ QLineEdit,
+ QVBoxLayout,
+ QComboBox,
)
from rare.models.wrapper import Wrapper
@@ -172,46 +185,75 @@ class WrapperWidget(QFrame):
drag.exec_(Qt.MoveAction)
+class WrapperSettingsScroll(QScrollArea):
+ def __init__(self, parent=None):
+ super(WrapperSettingsScroll, self).__init__(parent=parent)
+ self.setFrameShape(QFrame.StyledPanel)
+ self.setSizeAdjustPolicy(QScrollArea.AdjustToContents)
+ self.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
+ self.setAlignment(Qt.AlignLeft | Qt.AlignVCenter)
+ self.setWidgetResizable(True)
+ self.setProperty("no_kinetic_scroll", True)
+
+ self.setObjectName(type(self).__name__)
+ self.horizontalScrollBar().setObjectName(f"{self.objectName()}Bar")
+ self.verticalScrollBar().setObjectName(f"{self.objectName()}Bar")
+
+ def setWidget(self, w):
+ super().setWidget(w)
+ w.installEventFilter(self)
+
+ def eventFilter(self, a0: QObject, a1: QEvent) -> bool:
+ if a0 is self.widget() and a1.type() == QEvent.Resize:
+ self.__resize(a0)
+ return a0.event(a1)
+ return False
+
+ def __resize(self, e: QResizeEvent):
+ minh = self.horizontalScrollBar().minimum()
+ maxh = self.horizontalScrollBar().maximum()
+ # lk: when the scrollbar is not visible, min and max are 0
+ if maxh > minh:
+ height = (
+ e.size().height()
+ + self.rect().height() // 2
+ - self.contentsRect().height() // 2
+ + self.widget().layout().spacing()
+ + self.horizontalScrollBar().sizeHint().height()
+ )
+ else:
+ height = e.size().height() + self.rect().height() - self.contentsRect().height()
+ self.setMaximumHeight(max(height, self.minimumHeight()))
+
+
class WrapperSettings(QWidget):
def __init__(self, parent=None):
super(WrapperSettings, self).__init__(parent=parent)
- self.widget_stack = QStackedWidget(self)
- self.wrapper_scroll = QScrollArea(self.widget_stack)
- self.wrapper_scroll.setSizeAdjustPolicy(QScrollArea.AdjustToContents)
- self.wrapper_scroll.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
- self.wrapper_scroll.setWidgetResizable(True)
- self.wrapper_scroll.setProperty("no_kinetic_scroll", True)
- self.wrapper_container = WrapperContainer(parent=self.wrapper_scroll)
- self.wrapper_container.orderChanged.connect(self.__on_order_changed)
- self.wrapper_scroll.setWidget(self.wrapper_container)
-
- self.no_wrapper_label = QLabel(self.tr("No wrappers defined"), self.widget_stack)
-
- self.widget_stack.addWidget(self.wrapper_scroll)
- self.widget_stack.addWidget(self.no_wrapper_label)
+ self.wrapper_label = QLabel(self.tr("No wrappers defined"), self)
+ self.wrapper_label.setFrameStyle(QLabel.StyledPanel | QLabel.Plain)
+ self.wrapper_label.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
self.add_button = QPushButton(self.tr("Add wrapper"), self)
self.add_button.clicked.connect(self.__on_add)
- self.wrapper_scroll.horizontalScrollBar().rangeChanged.connect(self.adjust_scrollarea)
+ self.wrapper_scroll = WrapperSettingsScroll(self)
+ self.wrapper_scroll.setMinimumHeight(self.add_button.minimumSizeHint().height())
+
+ self.wrapper_container = WrapperContainer(self.wrapper_label, self.wrapper_scroll)
+ self.wrapper_container.orderChanged.connect(self.__on_order_changed)
+ self.wrapper_scroll.setWidget(self.wrapper_container)
# lk: set object names for the stylesheet
self.setObjectName("WrapperSettings")
- self.no_wrapper_label.setObjectName(f"{self.objectName()}Label")
- self.wrapper_scroll.setObjectName(f"{self.objectName()}Scroll")
- self.wrapper_scroll.horizontalScrollBar().setObjectName(
- f"{self.wrapper_scroll.objectName()}Bar")
- self.wrapper_scroll.verticalScrollBar().setObjectName(
- f"{self.wrapper_scroll.objectName()}Bar")
+ self.wrapper_label.setObjectName(f"{self.objectName()}Label")
main_layout = QHBoxLayout(self)
- main_layout.addWidget(self.widget_stack)
- main_layout.addWidget(self.add_button, alignment=Qt.AlignTop)
main_layout.setContentsMargins(0, 0, 0, 0)
- main_layout.setAlignment(Qt.AlignTop)
+ main_layout.addWidget(self.wrapper_scroll, alignment=Qt.AlignTop)
+ main_layout.addWidget(self.add_button, alignment=Qt.AlignTop)
- self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
+ self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
self.app_name: str = "default"
self.core = RareCore.instance().core()
@@ -223,27 +265,6 @@ class WrapperSettings(QWidget):
self.update_state()
return super().showEvent(a0)
- @pyqtSlot(int, int)
- def adjust_scrollarea(self, minh: int, maxh: int):
- wrapper_widget = self.wrapper_container.findChild(WrapperWidget)
- if not wrapper_widget:
- return
- # lk: when the scrollbar is not visible, min and max are 0
- if maxh > minh:
- self.wrapper_scroll.setMaximumHeight(
- wrapper_widget.sizeHint().height()
- + self.wrapper_scroll.rect().height() // 2
- - self.wrapper_scroll.contentsRect().height() // 2
- + self.wrapper_container.layout().spacing()
- + self.wrapper_scroll.horizontalScrollBar().sizeHint().height()
- )
- else:
- self.wrapper_scroll.setMaximumHeight(
- wrapper_widget.sizeHint().height()
- + self.wrapper_scroll.rect().height()
- - self.wrapper_scroll.contentsRect().height()
- )
-
@pyqtSlot(QWidget, int)
def __on_order_changed(self, widget: WrapperWidget, new_index: int):
wrapper = widget.data()
@@ -266,16 +287,12 @@ class WrapperSettings(QWidget):
self.add_user_wrapper(wrapper)
def __add_wrapper(self, wrapper: Wrapper, position: int = -1):
- self.widget_stack.setCurrentWidget(self.wrapper_scroll)
+ self.wrapper_label.setVisible(False)
widget = WrapperWidget(wrapper, self.wrapper_container)
if position < 0:
self.wrapper_container.addWidget(widget)
else:
self.wrapper_container.insertWidget(position, widget)
- self.adjust_scrollarea(
- self.wrapper_scroll.horizontalScrollBar().minimum(),
- self.wrapper_scroll.horizontalScrollBar().maximum(),
- )
widget.update_wrapper.connect(self.__update_wrapper)
widget.delete_wrapper.connect(self.__delete_wrapper)
@@ -304,7 +321,9 @@ class WrapperSettings(QWidget):
if wrapper.checksum in self.wrappers.get_game_md5sum_list(self.app_name):
QMessageBox.warning(
- self, self.tr("Warning"), self.tr("Wrapper {0} is already in the list").format(wrapper.as_str)
+ self,
+ self.tr("Warning"),
+ self.tr("Wrapper {0} is already in the list").format(wrapper.as_str),
)
return
@@ -314,7 +333,7 @@ class WrapperSettings(QWidget):
self.tr("Warning"),
self.tr("Wrapper {0} is not in $PATH. Add it anyway?").format(wrapper.executable),
QMessageBox.Yes | QMessageBox.No,
- QMessageBox.No
+ QMessageBox.No,
)
if ans == QMessageBox.No:
return
@@ -327,8 +346,7 @@ class WrapperSettings(QWidget):
wrappers.remove(wrapper)
self.wrappers.set_game_wrapper_list(self.app_name, wrappers)
if not wrappers:
- self.wrapper_scroll.setMaximumHeight(self.no_wrapper_label.sizeHint().height())
- self.widget_stack.setCurrentWidget(self.no_wrapper_label)
+ self.wrapper_label.setVisible(True)
@pyqtSlot(object, object)
def __update_wrapper(self, old: Wrapper, new: Wrapper):
@@ -345,10 +363,7 @@ class WrapperSettings(QWidget):
w.deleteLater()
wrappers = self.wrappers.get_game_wrapper_list(self.app_name)
if not wrappers:
- self.wrapper_scroll.setMaximumHeight(self.no_wrapper_label.sizeHint().height())
- self.widget_stack.setCurrentWidget(self.no_wrapper_label)
- else:
- self.widget_stack.setCurrentWidget(self.wrapper_scroll)
+ self.wrapper_label.setVisible(True)
for wrapper in wrappers:
self.__add_wrapper(wrapper)
@@ -357,15 +372,19 @@ class WrapperContainer(QWidget):
# QWidget: moving widget, int: new index
orderChanged: pyqtSignal = pyqtSignal(QWidget, int)
- def __init__(self, parent=None):
+ def __init__(self, label: QLabel, parent=None):
super(WrapperContainer, self).__init__(parent=parent)
self.setAcceptDrops(True)
- self.__layout = QHBoxLayout(self)
- self.__layout.setContentsMargins(0, 0, 0, 0)
- self.__layout.setAlignment(Qt.AlignLeft | Qt.AlignTop)
-
+ self.__layout = QHBoxLayout()
self.__drag_widget: Optional[QWidget] = None
+ main_layout = QHBoxLayout(self)
+ main_layout.addWidget(label)
+ main_layout.addLayout(self.__layout)
+ main_layout.setContentsMargins(0, 0, 0, 0)
+ main_layout.setAlignment(Qt.AlignLeft | Qt.AlignVCenter)
+ main_layout.setSizeConstraint(QHBoxLayout.SetFixedSize)
+
# lk: set object names for the stylesheet
self.setObjectName(type(self).__name__)
diff --git a/rare/resources/colors/Rare.scheme b/rare/resources/colors/Rare.scheme
index e2f3146c..5bab6402 100644
--- a/rare/resources/colors/Rare.scheme
+++ b/rare/resources/colors/Rare.scheme
@@ -2,22 +2,22 @@
Active\AlternateBase=#fff7f7f7
Active\Base=#ff333344
Active\BrightText=#ffffffff
-Active\Button=#ff3c3f41
+Active\Button=#ff272a2e
Active\ButtonText=#ffeeeeee
-Active\Dark=#ff9f0910
-Active\Highlight=#ff2f4f4f
+Active\Dark=#ff232529
+Active\Highlight=#ff385e5e
Active\HighlightedText=#ffeeeeee
-Active\Light=#ffffffff
-Active\Link=#ff0000ff
+Active\Light=#ff2c2f33
+Active\Link=#ff0000dd
Active\LinkVisited=#ffff00ff
-Active\Mid=#ffb80e35
-Active\Midlight=#ffca0651
+Active\Mid=#ff25272b
+Active\Midlight=#ff292c30
Active\PlaceholderText=#80eeeeee
-Active\Shadow=#ff767676
+Active\Shadow=#ff0b0c0d
Active\Text=#ffeeeeee
Active\ToolTipBase=#ffffffdc
Active\ToolTipText=#ffeeeeee
-Active\Window=#ff202225
+Active\Window=#ff212226
Active\WindowText=#ffeeeeee
Disabled\ButtonText=#ff808080
Disabled\HighlightedText=#ff808080
diff --git a/rare/resources/resources.py b/rare/resources/resources.py
index c7baa662..a45a4bb1 100644
Binary files a/rare/resources/resources.py and b/rare/resources/resources.py differ
diff --git a/rare/resources/static_css/__init__.py b/rare/resources/static_css/__init__.py
index 82dc3338..0e139851 100644
Binary files a/rare/resources/static_css/__init__.py and b/rare/resources/static_css/__init__.py differ
diff --git a/rare/resources/stylesheets/ChildOfMetropolis/__init__.py b/rare/resources/stylesheets/ChildOfMetropolis/__init__.py
index 7f9596ba..effb5639 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 9f22f1d4..abc7d805 100644
--- a/rare/resources/stylesheets/ChildOfMetropolis/stylesheet.qss
+++ b/rare/resources/stylesheets/ChildOfMetropolis/stylesheet.qss
@@ -77,6 +77,7 @@ QScrollBar {
border-radius: 2px;
padding: 2px;
}
+
QHeaderView::section,
QTableView QTableCornerButton::section,
QLineEdit,
@@ -104,21 +105,16 @@ QComboBox,
QSpinBox,
QDoubleSpinBox,
QProgressBar,
+QScrollArea,
QPushButton {
- min-height: 1.30em;
-}
-QLineEdit,
-QTextEdit
-QTimeEdit,
-QDateEdit,
-QDateTimeEdit,
-QSpinBox,
-QDoubleSpinBox,
-QProgressBar {
- max-height: 1.30em;
+ min-height: 3.00ex;
+ /* min-height: 1.30em; */
+ /* min-height: 18px; */
}
QToolButton {
- min-height: 1.10em;
+ min-height: 3.00ex;
+ /* min-height: 1.10em; */
+ /* min-height: 15px; */
}
QFrame[frameShape="0"] {
@@ -188,14 +184,19 @@ QComboBox QAbstractItemView {
border-top-width: 1;
image: url(":/stylesheets/ChildOfMetropolis/sort-down.svg");
}
+
QProgressBar {
+ padding: 0px;
text-align: center;
}
QProgressBar::chunk {
+ padding: 0px;
+ border-width: 0px;
width: 2%;
- margin: 0%;
+ margin: 0px;
background-color: #71DA7E;
}
+
QScrollBar {
border-radius: 4px;
padding: 1px;
@@ -673,7 +674,7 @@ QTabBar#MainTabBar::tab {
margin-right: 3px;
border-top-color: transparent;
border-bottom-color: #5CD3FF;
- padding: 5px;
+ padding: 3px 5px;
}/*
QTabBar#MainTabBar::tab:top:first,
QTabBar#MainTabBar::tab:bottom:first {
@@ -749,6 +750,7 @@ QLineEdit#SearchBar {
/* Wrapper settings styling */
QPushButton#WrapperWidgetButton,
QToolButton#WrapperWidgetButton {
+ padding: 0px;
border-color: #DADDDE;
}
QPushButton#WrapperWidgetButton:disabled,
@@ -762,6 +764,7 @@ QScrollArea#WrapperSettingsScroll {
QScrollBar#WrapperSettingsScrollBar {
background-color: #BCBEBF;
}
+/*
QLabel#WrapperSettingsLabel {
border-width: 1px;
border-style: solid;
@@ -775,3 +778,4 @@ 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 0b909452..b987bee2 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/stylesheet.qss b/rare/resources/stylesheets/RareStyle/stylesheet.qss
index 62bbb553..39c97c9e 100644
--- a/rare/resources/stylesheets/RareStyle/stylesheet.qss
+++ b/rare/resources/stylesheets/RareStyle/stylesheet.qss
@@ -8,7 +8,7 @@ disabled: #43474d rgb( 67, 71, 77) -- disabled font color
normal: #202225 rgb( 32, 34, 37) -- main background color
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
+selection: #274242 rgb( 39, 66, 66) -- background color for selectable widgets
alternate: #282a2e rgb( 40, 42, 46) -- background color for alternating rows in List/Tree/TableViews and for ScrollBars
[Border]
@@ -45,7 +45,7 @@ QLabel:disabled {
border-width: 0px;
background-color: transparent;
padding: 0px;
- selection-background-color: rgb( 47, 79, 79);
+ selection-background-color: rgb( 39, 66, 66);
}
QMenu,
@@ -77,6 +77,7 @@ QScrollBar {
border-radius: 2px;
padding: 2px;
}
+
QHeaderView::section,
QTableView QTableCornerButton::section,
QLineEdit,
@@ -92,7 +93,7 @@ QProgressBar,
QScrollBar {
border-color: rgb( 47, 79, 79);
background-color: rgb( 38, 38, 51);
- selection-background-color: rgb( 47, 79, 79);
+ selection-background-color: rgb( 39, 66, 66);
}
QLineEdit,
@@ -104,24 +105,16 @@ QComboBox,
QSpinBox,
QDoubleSpinBox,
QProgressBar,
+QScrollArea,
QPushButton {
+ min-height: 3.00ex;
/* min-height: 1.30em; */
- min-height: 18px;
-}
-QLineEdit,
-QTextEdit
-QTimeEdit,
-QDateEdit,
-QDateTimeEdit,
-QSpinBox,
-QDoubleSpinBox,
-QProgressBar {
- /* max-height: 1.30em; */
- max-height: 18px;
+ /* min-height: 18px; */
}
QToolButton {
+ min-height: 3.00ex;
/* min-height: 1.10em; */
- min-height: 15px;
+ /* min-height: 15px; */
}
QFrame[frameShape="0"] {
@@ -141,7 +134,7 @@ QComboBox:!editable:hover {
}
*::item:selected,
QComboBox QAbstractItemView {
- selection-background-color: rgb( 47, 79, 79);
+ selection-background-color: rgb( 39, 66, 66);
}
*::drop-down,
*::drop-down:editable,
@@ -191,14 +184,19 @@ QComboBox QAbstractItemView {
border-top-width: 1;
image: url(":/stylesheets/RareStyle/sort-down.svg");
}
+
QProgressBar {
+ padding: 0px;
text-align: center;
}
QProgressBar::chunk {
+ padding: 0px;
+ border-width: 0px;
width: 2%;
- margin: 0%;
- background-color: rgb( 47, 79, 79);
+ margin: 0px;
+ background-color: rgb( 39, 66, 66);
}
+
QScrollBar {
border-radius: 4px;
padding: 1px;
@@ -303,7 +301,7 @@ QListView::item:selected,
QTreeView::item:selected,
QTableView::item:selected {
border-color: rgb( 72, 61, 139);
- background-color: rgb( 47, 79, 79);
+ background-color: rgb( 39, 66, 66);
}
QPushButton,
@@ -766,6 +764,7 @@ QScrollArea#WrapperSettingsScroll {
QScrollBar#WrapperSettingsScrollBar {
background-color: rgb( 40, 42, 46);
}
+/*
QLabel#WrapperSettingsLabel {
border-width: 1px;
border-style: solid;
@@ -779,3 +778,4 @@ 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/tabs/downloads/download_widget.py b/rare/ui/components/tabs/downloads/download_widget.py
index 4b0b3599..ebacb9bd 100644
--- a/rare/ui/components/tabs/downloads/download_widget.py
+++ b/rare/ui/components/tabs/downloads/download_widget.py
@@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'rare/ui/components/tabs/downloads/download_widget.ui'
#
-# Created by: PyQt5 UI code generator 5.15.8
+# Created by: PyQt5 UI code generator 5.15.10
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
@@ -14,28 +14,24 @@ from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_DownloadWidget(object):
def setupUi(self, DownloadWidget):
DownloadWidget.setObjectName("DownloadWidget")
- DownloadWidget.resize(490, 90)
+ DownloadWidget.resize(479, 86)
DownloadWidget.setWindowTitle("DownloadWidget")
self.active_download_layout = QtWidgets.QGridLayout(DownloadWidget)
self.active_download_layout.setContentsMargins(0, 0, 0, 0)
self.active_download_layout.setObjectName("active_download_layout")
- self.downloaded = QtWidgets.QLabel(DownloadWidget)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
+ self.dl_name = QtWidgets.QLabel(DownloadWidget)
+ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.downloaded.sizePolicy().hasHeightForWidth())
- self.downloaded.setSizePolicy(sizePolicy)
- self.downloaded.setText("downloaded")
- self.downloaded.setObjectName("downloaded")
- self.active_download_layout.addWidget(self.downloaded, 2, 3, 1, 1)
- self.dl_speed_label = QtWidgets.QLabel(DownloadWidget)
+ sizePolicy.setHeightForWidth(self.dl_name.sizePolicy().hasHeightForWidth())
+ self.dl_name.setSizePolicy(sizePolicy)
font = QtGui.QFont()
- font.setBold(True)
- font.setWeight(75)
- self.dl_speed_label.setFont(font)
- self.dl_speed_label.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
- self.dl_speed_label.setObjectName("dl_speed_label")
- self.active_download_layout.addWidget(self.dl_speed_label, 1, 2, 1, 1)
+ font.setBold(False)
+ font.setWeight(50)
+ self.dl_name.setFont(font)
+ self.dl_name.setText("dl_name")
+ self.dl_name.setObjectName("dl_name")
+ self.active_download_layout.addWidget(self.dl_name, 0, 1, 1, 3)
self.dl_name_label = QtWidgets.QLabel(DownloadWidget)
font = QtGui.QFont()
font.setBold(True)
@@ -53,15 +49,14 @@ class Ui_DownloadWidget(object):
self.cache_used.setText("cache_used")
self.cache_used.setObjectName("cache_used")
self.active_download_layout.addWidget(self.cache_used, 2, 1, 1, 1)
- self.time_left = QtWidgets.QLabel(DownloadWidget)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.time_left.sizePolicy().hasHeightForWidth())
- self.time_left.setSizePolicy(sizePolicy)
- self.time_left.setText("time_left")
- self.time_left.setObjectName("time_left")
- self.active_download_layout.addWidget(self.time_left, 1, 1, 1, 1)
+ self.dl_speed_label = QtWidgets.QLabel(DownloadWidget)
+ font = QtGui.QFont()
+ font.setBold(True)
+ font.setWeight(75)
+ self.dl_speed_label.setFont(font)
+ self.dl_speed_label.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
+ self.dl_speed_label.setObjectName("dl_speed_label")
+ self.active_download_layout.addWidget(self.dl_speed_label, 1, 2, 1, 1)
self.downloaded_label = QtWidgets.QLabel(DownloadWidget)
font = QtGui.QFont()
font.setBold(True)
@@ -79,27 +74,6 @@ class Ui_DownloadWidget(object):
self.dl_speed.setText("dl_speed")
self.dl_speed.setObjectName("dl_speed")
self.active_download_layout.addWidget(self.dl_speed, 1, 3, 1, 1)
- self.cache_used_label = QtWidgets.QLabel(DownloadWidget)
- font = QtGui.QFont()
- font.setBold(True)
- font.setWeight(75)
- self.cache_used_label.setFont(font)
- self.cache_used_label.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
- self.cache_used_label.setObjectName("cache_used_label")
- self.active_download_layout.addWidget(self.cache_used_label, 2, 0, 1, 1)
- self.dl_name = QtWidgets.QLabel(DownloadWidget)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.dl_name.sizePolicy().hasHeightForWidth())
- self.dl_name.setSizePolicy(sizePolicy)
- font = QtGui.QFont()
- font.setBold(False)
- font.setWeight(50)
- self.dl_name.setFont(font)
- self.dl_name.setText("dl_name")
- self.dl_name.setObjectName("dl_name")
- self.active_download_layout.addWidget(self.dl_name, 0, 1, 1, 3)
self.time_left_label = QtWidgets.QLabel(DownloadWidget)
font = QtGui.QFont()
font.setBold(True)
@@ -108,23 +82,39 @@ class Ui_DownloadWidget(object):
self.time_left_label.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.time_left_label.setObjectName("time_left_label")
self.active_download_layout.addWidget(self.time_left_label, 1, 0, 1, 1)
- self.kill_button = QtWidgets.QPushButton(DownloadWidget)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
+ self.downloaded = QtWidgets.QLabel(DownloadWidget)
+ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.kill_button.sizePolicy().hasHeightForWidth())
- self.kill_button.setSizePolicy(sizePolicy)
- self.kill_button.setObjectName("kill_button")
- self.active_download_layout.addWidget(self.kill_button, 3, 4, 1, 1)
+ sizePolicy.setHeightForWidth(self.downloaded.sizePolicy().hasHeightForWidth())
+ self.downloaded.setSizePolicy(sizePolicy)
+ self.downloaded.setText("downloaded")
+ self.downloaded.setObjectName("downloaded")
+ self.active_download_layout.addWidget(self.downloaded, 2, 3, 1, 1)
+ self.time_left = QtWidgets.QLabel(DownloadWidget)
+ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.time_left.sizePolicy().hasHeightForWidth())
+ self.time_left.setSizePolicy(sizePolicy)
+ self.time_left.setText("time_left")
+ self.time_left.setObjectName("time_left")
+ self.active_download_layout.addWidget(self.time_left, 1, 1, 1, 1)
+ self.cache_used_label = QtWidgets.QLabel(DownloadWidget)
+ font = QtGui.QFont()
+ font.setBold(True)
+ font.setWeight(75)
+ self.cache_used_label.setFont(font)
+ self.cache_used_label.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
+ self.cache_used_label.setObjectName("cache_used_label")
+ self.active_download_layout.addWidget(self.cache_used_label, 2, 0, 1, 1)
self.progress_bar = QtWidgets.QProgressBar(DownloadWidget)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Maximum)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.progress_bar.sizePolicy().hasHeightForWidth())
- self.progress_bar.setSizePolicy(sizePolicy)
self.progress_bar.setProperty("value", 0)
self.progress_bar.setObjectName("progress_bar")
self.active_download_layout.addWidget(self.progress_bar, 3, 0, 1, 4)
+ self.kill_button = QtWidgets.QPushButton(DownloadWidget)
+ self.kill_button.setObjectName("kill_button")
+ self.active_download_layout.addWidget(self.kill_button, 3, 4, 1, 1)
self.active_download_layout.setColumnStretch(1, 1)
self.active_download_layout.setColumnStretch(3, 1)
@@ -132,11 +122,11 @@ class Ui_DownloadWidget(object):
def retranslateUi(self, DownloadWidget):
_translate = QtCore.QCoreApplication.translate
- self.dl_speed_label.setText(_translate("DownloadWidget", "Download speed:"))
self.dl_name_label.setText(_translate("DownloadWidget", "Current download:"))
+ self.dl_speed_label.setText(_translate("DownloadWidget", "Download speed:"))
self.downloaded_label.setText(_translate("DownloadWidget", "Downloaded:"))
- self.cache_used_label.setText(_translate("DownloadWidget", "Cache size:"))
self.time_left_label.setText(_translate("DownloadWidget", "Time left:"))
+ self.cache_used_label.setText(_translate("DownloadWidget", "Cache size:"))
self.kill_button.setText(_translate("DownloadWidget", "Stop Download"))
diff --git a/rare/ui/components/tabs/downloads/download_widget.ui b/rare/ui/components/tabs/downloads/download_widget.ui
index 7cd0aa8a..e35c4342 100644
--- a/rare/ui/components/tabs/downloads/download_widget.ui
+++ b/rare/ui/components/tabs/downloads/download_widget.ui
@@ -6,8 +6,8 @@
0
0
- 490
- 90
+ 479
+ 86
@@ -26,32 +26,22 @@
0
- -
-
+
-
+
-
+
0
0
-
- downloaded
-
-
-
- -
-
- 75
- true
+ 50
+ false
- Download speed:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+ dl_name
@@ -84,16 +74,19 @@
- -
-
-
-
- 0
- 0
-
+
-
+
+
+
+ 75
+ true
+
- time_left
+ Download speed:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
@@ -126,41 +119,6 @@
- -
-
-
-
- 75
- true
-
-
-
- Cache size:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 50
- false
-
-
-
- dl_name
-
-
-
-
@@ -177,32 +135,62 @@
- -
-
+
-
+
-
+
0
0
- Stop Download
+ downloaded
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ time_left
+
+
+
+ -
+
+
+
+ 75
+ true
+
+
+
+ Cache size:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- 0
- 0
-
-
0
+ -
+
+
+ Stop Download
+
+
+
diff --git a/rare/ui/components/tabs/settings/legendary.py b/rare/ui/components/tabs/settings/legendary.py
index ed51c50b..30000ce0 100644
--- a/rare/ui/components/tabs/settings/legendary.py
+++ b/rare/ui/components/tabs/settings/legendary.py
@@ -25,7 +25,7 @@ class Ui_LegendarySettings(object):
self.install_dir_group.setObjectName("install_dir_group")
self.install_dir_layout = QtWidgets.QVBoxLayout(self.install_dir_group)
self.install_dir_layout.setObjectName("install_dir_layout")
- self.left_layout.addWidget(self.install_dir_group, 0, QtCore.Qt.AlignTop)
+ self.left_layout.addWidget(self.install_dir_group)
self.download_group = QtWidgets.QGroupBox(LegendarySettings)
self.download_group.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
self.download_group.setObjectName("download_group")
@@ -97,7 +97,7 @@ class Ui_LegendarySettings(object):
self.disable_https_check.setText("")
self.disable_https_check.setObjectName("disable_https_check")
self.download_layout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.disable_https_check)
- self.left_layout.addWidget(self.download_group, 0, QtCore.Qt.AlignTop)
+ self.left_layout.addWidget(self.download_group)
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.left_layout.addItem(spacerItem)
self.legendary_layout.addLayout(self.left_layout)
@@ -113,7 +113,7 @@ class Ui_LegendarySettings(object):
self.locale_group.setObjectName("locale_group")
self.locale_layout = QtWidgets.QVBoxLayout(self.locale_group)
self.locale_layout.setObjectName("locale_layout")
- self.right_layout.addWidget(self.locale_group, 0, QtCore.Qt.AlignTop)
+ self.right_layout.addWidget(self.locale_group)
self.cleanup_group = QtWidgets.QGroupBox(LegendarySettings)
self.cleanup_group.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
self.cleanup_group.setObjectName("cleanup_group")
diff --git a/rare/ui/components/tabs/settings/legendary.ui b/rare/ui/components/tabs/settings/legendary.ui
index 55704c85..306c8bc3 100644
--- a/rare/ui/components/tabs/settings/legendary.ui
+++ b/rare/ui/components/tabs/settings/legendary.ui
@@ -16,7 +16,7 @@
-
-
-
+
-
Default installation folder
@@ -27,7 +27,7 @@
- -
+
-
Download settings
@@ -183,7 +183,7 @@
-
-
-
+
-
diff --git a/rare/utils/extra_widgets.py b/rare/utils/extra_widgets.py
index e5e9ca3d..f126f769 100644
--- a/rare/utils/extra_widgets.py
+++ b/rare/utils/extra_widgets.py
@@ -123,19 +123,19 @@ class ButtonLineEdit(QLineEdit):
self.button.clicked.connect(self.buttonClicked.emit)
self.setPlaceholderText(placeholder_text)
- frame_width = self.style().pixelMetric(QStyle.PM_DefaultFrameWidth)
- button_size = self.button.sizeHint()
-
- self.setStyleSheet(
- f"QLineEdit#{self.objectName()} {{padding-right: {(button_size.width() + frame_width + 1)}px; }}"
- )
- self.setMinimumSize(
- max(self.minimumSizeHint().width(), button_size.width() + frame_width * 2 + 2),
- max(
- self.minimumSizeHint().height(),
- button_size.height() + frame_width * 2 + 2,
- ),
- )
+ # frame_width = self.style().pixelMetric(QStyle.PM_DefaultFrameWidth)
+ # button_size = self.button.sizeHint()
+ #
+ # self.setStyleSheet(
+ # f"QLineEdit#{self.objectName()} {{padding-right: {(button_size.width() + frame_width + 1)}px; }}"
+ # )
+ # self.setMinimumSize(
+ # max(self.minimumSizeHint().width(), button_size.width() + frame_width * 2 + 2),
+ # max(
+ # self.minimumSizeHint().height(),
+ # button_size.height() + frame_width * 2 + 2,
+ # ),
+ # )
def resizeEvent(self, event):
frame_width = self.style().pixelMetric(QStyle.PM_DefaultFrameWidth)
diff --git a/rare/widgets/image_widget.py b/rare/widgets/image_widget.py
index eb5bca7f..c453490c 100644
--- a/rare/widgets/image_widget.py
+++ b/rare/widgets/image_widget.py
@@ -136,7 +136,7 @@ class ImageWidget(QWidget):
painter.setOpacity(1.0)
painter.setCompositionMode(QPainter.CompositionMode_Source)
overlay, _ = self._generate_rounded_overlay()
- painter.fillPath(overlay, self.palette().color(QPalette.Background))
+ painter.fillPath(overlay, self.palette().color(QPalette.Window))
def paint_overlay_squared(self, painter: QPainter, a0: QPaintEvent) -> None:
painter.setRenderHint(QPainter.Antialiasing, False)
diff --git a/rare/widgets/side_tab.py b/rare/widgets/side_tab.py
index 25b04481..54dcadce 100644
--- a/rare/widgets/side_tab.py
+++ b/rare/widgets/side_tab.py
@@ -99,17 +99,19 @@ class SideTabContainer(QWidget):
layout.addWidget(self.title)
if not hasattr(widget, "implements_scrollarea") or not widget.implements_scrollarea:
- self.scrollarea = QScrollArea(self)
- self.scrollarea.setSizeAdjustPolicy(QScrollArea.AdjustToContents)
- self.scrollarea.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
- self.scrollarea.setFrameStyle(QScrollArea.NoFrame)
- self.scrollarea.setMinimumWidth(
- widget.sizeHint().width() + self.scrollarea.verticalScrollBar().sizeHint().width()
+ scrollarea = QScrollArea(self)
+ scrollarea.setSizeAdjustPolicy(QScrollArea.AdjustToContents)
+ scrollarea.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
+ scrollarea.setFrameStyle(QScrollArea.NoFrame)
+ scrollarea.setMinimumWidth(
+ widget.sizeHint().width() + scrollarea.verticalScrollBar().sizeHint().width()
)
- self.scrollarea.setWidgetResizable(True)
+ scrollarea.setWidgetResizable(True)
widget.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
- self.scrollarea.setWidget(widget)
- layout.addWidget(self.scrollarea)
+ scrollarea.setWidget(widget)
+ scrollarea.widget().setAutoFillBackground(False)
+ scrollarea.viewport().setAutoFillBackground(False)
+ layout.addWidget(scrollarea)
else:
layout.addWidget(widget)