mirror of
https://github.com/NinjaCheetah/NUSGet.git
synced 2025-06-07 19:11:01 -04:00
Compare commits
No commits in common. "5a8439906a3cefb2788586359fea4a9ab4bb4163" and "3a6ef23fb92aa08821c00e974e115f3402cab5a1" have entirely different histories.
5a8439906a
...
3a6ef23fb9
@ -122,13 +122,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
|||||||
list_view = QListView()
|
list_view = QListView()
|
||||||
list_view.setMouseTracking(True)
|
list_view.setMouseTracking(True)
|
||||||
self.ui.console_select_dropdown.setView(list_view)
|
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)
|
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:
|
# Title tree loading code. Now powered by Models:tm:
|
||||||
wii_model = NUSGetTreeModel(wii_database, root_name="Wii Titles")
|
wii_model = NUSGetTreeModel(wii_database, root_name="Wii Titles")
|
||||||
vwii_model = NUSGetTreeModel(vwii_database, root_name="vWii Titles")
|
vwii_model = NUSGetTreeModel(vwii_database, root_name="vWii Titles")
|
||||||
|
@ -8,15 +8,7 @@ import requests
|
|||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
from PySide6.QtCore import Qt, QSize
|
from PySide6.QtCore import Qt as _Qt
|
||||||
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)
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@ -50,7 +42,7 @@ class BatchResults:
|
|||||||
|
|
||||||
def connect_label_to_checkbox(label, checkbox):
|
def connect_label_to_checkbox(label, checkbox):
|
||||||
def toggle_checkbox(event):
|
def toggle_checkbox(event):
|
||||||
if checkbox.isEnabled() and event.button() == Qt.LeftButton:
|
if checkbox.isEnabled() and event.button() == _Qt.LeftButton:
|
||||||
checkbox.toggle()
|
checkbox.toggle()
|
||||||
label.mousePressEvent = toggle_checkbox
|
label.mousePressEvent = toggle_checkbox
|
||||||
|
|
||||||
|
@ -15,38 +15,27 @@ QMenuBar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QMenuBar::item:selected {
|
QMenuBar::item:selected {
|
||||||
background-color: rgba(60, 60, 60, 1);
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
QMenuBar::item:pressed {
|
|
||||||
background-color: #1a73e8;
|
background-color: #1a73e8;
|
||||||
color: white;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QMenu {
|
QMenu {
|
||||||
background-color: #2b2b2b;
|
background-color: #222222;
|
||||||
border: 1px solid rgba(70, 70, 70, 1);
|
border: 1px solid rgba(70, 70, 70, 1);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
padding: 6px 2px;
|
padding: 6px 10px;
|
||||||
margin: 4px 0;
|
margin: 4px 0px;
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
QMenu::item {
|
|
||||||
padding: 6px 2px;
|
|
||||||
margin: 2px;
|
|
||||||
border-radius: 4px;
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QMenu::item:selected {
|
QMenu::item:selected {
|
||||||
background-color: #1a73e8;
|
background-color: #1a73e8;
|
||||||
color: white;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QMenu::icon {
|
QAction {
|
||||||
padding: 4px;
|
background-color: #222222;
|
||||||
|
border: 1px solid rgba(70, 70, 70, 1);
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 6px 10px;
|
||||||
|
margin: 4px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
QRadioButton {
|
QRadioButton {
|
||||||
@ -150,10 +139,6 @@ QTreeView QHeaderView::section {
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
QTreeView::item {
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
QTreeView::item:hover {
|
QTreeView::item:hover {
|
||||||
background-color: rgba(60, 60, 60, 1);
|
background-color: rgba(60, 60, 60, 1);
|
||||||
}
|
}
|
||||||
@ -211,7 +196,6 @@ QPushButton:disabled {
|
|||||||
|
|
||||||
QComboBox {
|
QComboBox {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
combobox-popup: 0;
|
|
||||||
border: 1px solid rgba(70, 70, 70, 1);
|
border: 1px solid rgba(70, 70, 70, 1);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
padding: 6px 10px;
|
padding: 6px 10px;
|
||||||
@ -249,6 +233,8 @@ QComboBox QAbstractItemView {
|
|||||||
background-color: #2b2b2b;
|
background-color: #2b2b2b;
|
||||||
border: 1px solid #444444;
|
border: 1px solid #444444;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
selection-background-color: #1a73e8;
|
||||||
|
selection-color: white;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
@ -258,7 +244,6 @@ QComboBox QAbstractItemView::item {
|
|||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
padding: 4px 8px;
|
padding: 4px 8px;
|
||||||
margin: 2px 0px;
|
margin: 2px 0px;
|
||||||
color: white;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QComboBox QAbstractItemView::item:hover {
|
QComboBox QAbstractItemView::item:hover {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user