mirror of
https://github.com/NinjaCheetah/NUSGet.git
synced 2025-06-07 11:01:02 -04:00
Compare commits
4 Commits
3a6ef23fb9
...
5a8439906a
Author | SHA1 | Date | |
---|---|---|---|
5a8439906a | |||
69299ad956 | |||
bc8592178c | |||
1ee30146e5 |
@ -122,7 +122,13 @@ 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")
|
||||
|
@ -8,7 +8,15 @@ import requests
|
||||
from dataclasses import dataclass
|
||||
from typing import List
|
||||
|
||||
from PySide6.QtCore import Qt as _Qt
|
||||
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)
|
||||
|
||||
|
||||
@dataclass
|
||||
@ -42,7 +50,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
|
||||
|
||||
|
@ -15,27 +15,38 @@ QMenuBar {
|
||||
}
|
||||
|
||||
QMenuBar::item:selected {
|
||||
background-color: rgba(60, 60, 60, 1);
|
||||
color: white;
|
||||
}
|
||||
|
||||
QMenuBar::item:pressed {
|
||||
background-color: #1a73e8;
|
||||
color: white;
|
||||
}
|
||||
|
||||
QMenu {
|
||||
background-color: #222222;
|
||||
background-color: #2b2b2b;
|
||||
border: 1px solid rgba(70, 70, 70, 1);
|
||||
border-radius: 8px;
|
||||
padding: 6px 10px;
|
||||
margin: 4px 0px;
|
||||
padding: 6px 2px;
|
||||
margin: 4px 0;
|
||||
color: white;
|
||||
}
|
||||
|
||||
QMenu::item {
|
||||
padding: 6px 2px;
|
||||
margin: 2px;
|
||||
border-radius: 4px;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
QMenu::item:selected {
|
||||
background-color: #1a73e8;
|
||||
color: white;
|
||||
}
|
||||
|
||||
QAction {
|
||||
background-color: #222222;
|
||||
border: 1px solid rgba(70, 70, 70, 1);
|
||||
border-radius: 8px;
|
||||
padding: 6px 10px;
|
||||
margin: 4px 0px;
|
||||
QMenu::icon {
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
QRadioButton {
|
||||
@ -139,6 +150,10 @@ QTreeView QHeaderView::section {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
QTreeView::item {
|
||||
color: white;
|
||||
}
|
||||
|
||||
QTreeView::item:hover {
|
||||
background-color: rgba(60, 60, 60, 1);
|
||||
}
|
||||
@ -196,6 +211,7 @@ QPushButton:disabled {
|
||||
|
||||
QComboBox {
|
||||
background-color: transparent;
|
||||
combobox-popup: 0;
|
||||
border: 1px solid rgba(70, 70, 70, 1);
|
||||
border-radius: 8px;
|
||||
padding: 6px 10px;
|
||||
@ -233,8 +249,6 @@ QComboBox QAbstractItemView {
|
||||
background-color: #2b2b2b;
|
||||
border: 1px solid #444444;
|
||||
border-radius: 8px;
|
||||
selection-background-color: #1a73e8;
|
||||
selection-color: white;
|
||||
padding: 4px;
|
||||
outline: none;
|
||||
}
|
||||
@ -244,6 +258,7 @@ QComboBox QAbstractItemView::item {
|
||||
border-radius: 4px;
|
||||
padding: 4px 8px;
|
||||
margin: 2px 0px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
QComboBox QAbstractItemView::item:hover {
|
||||
|
Loading…
x
Reference in New Issue
Block a user