Compare commits

..

No commits in common. "5a8439906a3cefb2788586359fea4a9ab4bb4163" and "3a6ef23fb92aa08821c00e974e115f3402cab5a1" have entirely different histories.

3 changed files with 13 additions and 42 deletions

View File

@ -122,13 +122,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
list_view = QListView()
list_view.setMouseTracking(True)
self.ui.console_select_dropdown.setView(list_view)
dropdown_delegate = ComboBoxItemDelegate()
self.ui.console_select_dropdown.setItemDelegate(dropdown_delegate)
self.ui.console_select_dropdown.currentIndexChanged.connect(self.selected_console_changed)
# Fix the annoying background on the help menu items.
self.ui.menuHelp.setWindowFlags(self.ui.menuHelp.windowFlags() | Qt.FramelessWindowHint)
self.ui.menuHelp.setWindowFlags(self.ui.menuHelp.windowFlags() | Qt.NoDropShadowWindowHint)
self.ui.menuHelp.setAttribute(Qt.WA_TranslucentBackground)
# Title tree loading code. Now powered by Models:tm:
wii_model = NUSGetTreeModel(wii_database, root_name="Wii Titles")
vwii_model = NUSGetTreeModel(vwii_database, root_name="vWii Titles")

View File

@ -8,15 +8,7 @@ import requests
from dataclasses import dataclass
from typing import List
from PySide6.QtCore import Qt, QSize
from PySide6.QtWidgets import QStyledItemDelegate, QSizePolicy
# This is required to make the dropdown look correct with the custom styling. A little fuzzy on the why, but it has to
# do with how Qt handles rendering the dropdown items. The sizing has to be overridden so that they don't overlap.
class ComboBoxItemDelegate(QStyledItemDelegate):
def sizeHint(self, option, index):
return QSize(option.rect.width(), 33)
from PySide6.QtCore import Qt as _Qt
@dataclass
@ -50,7 +42,7 @@ class BatchResults:
def connect_label_to_checkbox(label, checkbox):
def toggle_checkbox(event):
if checkbox.isEnabled() and event.button() == Qt.LeftButton:
if checkbox.isEnabled() and event.button() == _Qt.LeftButton:
checkbox.toggle()
label.mousePressEvent = toggle_checkbox

View File

@ -15,38 +15,27 @@ QMenuBar {
}
QMenuBar::item:selected {
background-color: rgba(60, 60, 60, 1);
color: white;
}
QMenuBar::item:pressed {
background-color: #1a73e8;
color: white;
}
QMenu {
background-color: #2b2b2b;
background-color: #222222;
border: 1px solid rgba(70, 70, 70, 1);
border-radius: 8px;
padding: 6px 2px;
margin: 4px 0;
color: white;
}
QMenu::item {
padding: 6px 2px;
margin: 2px;
border-radius: 4px;
background-color: transparent;
padding: 6px 10px;
margin: 4px 0px;
}
QMenu::item:selected {
background-color: #1a73e8;
color: white;
}
QMenu::icon {
padding: 4px;
QAction {
background-color: #222222;
border: 1px solid rgba(70, 70, 70, 1);
border-radius: 8px;
padding: 6px 10px;
margin: 4px 0px;
}
QRadioButton {
@ -150,10 +139,6 @@ QTreeView QHeaderView::section {
font-weight: 500;
}
QTreeView::item {
color: white;
}
QTreeView::item:hover {
background-color: rgba(60, 60, 60, 1);
}
@ -211,7 +196,6 @@ QPushButton:disabled {
QComboBox {
background-color: transparent;
combobox-popup: 0;
border: 1px solid rgba(70, 70, 70, 1);
border-radius: 8px;
padding: 6px 10px;
@ -249,6 +233,8 @@ QComboBox QAbstractItemView {
background-color: #2b2b2b;
border: 1px solid #444444;
border-radius: 8px;
selection-background-color: #1a73e8;
selection-color: white;
padding: 4px;
outline: none;
}
@ -258,7 +244,6 @@ QComboBox QAbstractItemView::item {
border-radius: 4px;
padding: 4px 8px;
margin: 2px 0px;
color: white;
}
QComboBox QAbstractItemView::item:hover {