diff rc/dark.qss @ 105:6d8da6e64d61

theme: add dark stylesheet, make it actually usable win32: make the titlebar black where available
author Paper <mrpapersonic@gmail.com>
date Sun, 05 Nov 2023 03:54:26 -0500
parents
children 49c8d1976869
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rc/dark.qss	Sun Nov 05 03:54:26 2023 -0500
@@ -0,0 +1,286 @@
+/*
+Much of this is taken from the Breeze Style Sheets,
+which is under the MIT license:
+
+Copyright © `<2013-2014>` `<Colin Duquesnoy>`
+Copyright © `<2015-2016>` `<Alex Huszagh>`
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the “Software”), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+/* Colors should be the same as the QPalette in gui/theme.cc, i.e.:
+	window == darkgray == #353535;
+	??? == gray == #808080;
+	base == black == #191919;
+	highlighted == blue = #2A82DA;
+
+   It's a shame Qt stylesheets don't properly support variables :')
+   Maybe we could configure it with cmake?
+*/
+
+AnimeListPage::pane {
+	margin: 0.04em;
+}
+
+AnimeListPage::pane,
+QTabWidget::pane:top {
+	border: 0.04em solid #808080;
+	top: -0.04em;
+}
+
+AnimeListPage::pane,
+QTabWidget::pane:bottom {
+	border: 0.04em solid #808080;
+	bottom: -0.04em;
+}
+
+AnimeListPage::pane,
+QTabWidget::pane:left {
+	border: 0.04em solid #808080;
+	left: -0.04em;
+}
+
+AnimeListPage::pane,
+QTabWidget::pane:right {
+	border: 0.04em solid #808080;
+	right: -0.04em;
+}
+
+QTabBar {
+	qproperty-drawBase: 0;
+	left: 0.23em;
+	border-radius: 0.13em;
+	selection-color: transparent;
+}
+
+QTabBar:focus {
+	border: 0em transparent black;
+}
+
+QTabBar::tab:top,
+QTabBar::tab:top:last,
+QTabBar::tab:top:only-one {
+	color: white;
+	border: 0.04em transparent black;
+	border-left: 0.04em solid #808080;
+	border-right: 0.04em solid #808080;
+	border-top: 0.04em solid #808080;
+	background-color: #353535;
+	min-width: 50px;
+	padding-top: 0.23em;
+	padding-bottom: 0.23em;
+	padding-left: 0.46em;
+	padding-right: 0.46em;
+	border-radius: 0.09em;
+	border-bottom-left-radius: 0em;
+	border-bottom-right-radius: 0em;
+}
+
+QTabBar::tab:top:!selected {
+	color: white;
+	background-color: #353535;
+	border: 0.04em solid #808080;
+	border-radius: 0.09em;
+	border-bottom-left-radius: 0em;
+	border-bottom-right-radius: 0em;
+	margin-top: 0.13em;
+}
+
+QTabBar::tab:top:next-selected {
+	border-right: 0.04em transparent #353535;
+	border-bottom-left-radius: 0em;
+	border-bottom-right-radius: 0em;
+}
+
+QTabBar::tab:top:previous-selected {
+	border-left: 0.04em transparent #353535;
+	border-bottom-left-radius: 0em;
+	border-bottom-right-radius: 0em;
+}
+
+QTabBar::tab:top:!selected:hover {
+	background-color: rgba(42, 130, 218, 0.1);
+	border-radius: 0.09em;
+	border-bottom-left-radius: 0em;
+	border-bottom-right-radius: 0em;
+}
+
+QTabBar::tab:top:!selected:first:hover {
+	background-color: rgba(42, 130, 218, 0.1);
+	border-radius: 0.09em;
+	border-bottom-left-radius: 0em;
+	border-bottom-right-radius: 0em;
+}
+
+QGroupBox::title {
+	color: white;
+}
+
+QComboBox,
+QPushButton,
+QDateEdit,
+QSpinBox {
+	background-color: #353535;
+	color: white;
+}
+
+/*
+ * QLineEdit
+ */
+
+QLineEdit:!read-only {
+	background-color: #191919;
+	padding: 0.23em;
+	border-style: solid;
+	border: 0.04em solid #808080;
+	border-radius: 0.09em;
+}
+
+Line {
+	background: transparent;
+}
+
+/* QMenuBar */
+
+QMenuBar {
+	background-color: #353535;
+	color: white;
+}
+
+QMenuBar::item {
+	background: transparent;
+}
+
+QMenuBar::item:selected {
+	background: transparent;
+	border: 0.04em solid #2A82DA;
+}
+
+QMenuBar::item:disabled {
+	color: #808080;
+}
+
+QMenuBar::item:pressed {
+	background-color: #2A82DA;
+	color: white;
+	margin-bottom: -0.09em;
+	padding-bottom: 0.09em;
+}
+
+/* QMenu */
+
+QMenu {
+	color: white;
+	background-color: #353535;
+	margin: 0.09em;
+}
+
+QMenu::icon {
+	margin: 0.23em;
+}
+
+QMenu::item {
+	/* Add extra padding on the right for the QMenu arrow */
+	padding: 0.23em 1.5em 0.23em 1.3em;
+	border: 0.09em solid transparent;
+	background: transparent;
+}
+
+QMenu::item:selected {
+	color: white;
+	background-color: #2A82DA;
+}
+
+QMenu::item:selected:disabled {
+	background-color: #353535;
+}
+
+QMenu::item:disabled {
+	color: #808080;
+}
+
+QMenu::indicator {
+	width: 0.8em;
+	height: 0.8em;
+	/* To align with QMenu::icon, which has a 0.23em margin. */
+	margin-left: 0.3em;
+	subcontrol-position: center left;
+}
+
+/*
+ * QHeaderView:
+ * Need this for the anime list, on Windows it gets screwed up.
+*/
+
+QHeaderView {
+	background-color: #353535;
+	border: 0.04em transparent;
+	border-radius: 0em;
+	margin: 0em;
+	padding: 0em;
+}
+
+QHeaderView::section {
+	background-color: #353535;
+	border: 0.04em solid #808080;
+	color: #eff0f1;
+	border-radius: 0em;
+	padding: 0em 0.23em 0em 0.23em;
+	text-align: center;
+}
+
+QHeaderView::section::vertical::first,
+QHeaderView::section::vertical::only-one {
+	border-top: 0.04em solid #808080;
+}
+
+QHeaderView::section::vertical {
+	border-top: transparent;
+}
+
+QHeaderView::section::horizontal::first,
+QHeaderView::section::horizontal::only-one {
+	border-left: 0.04em solid #808080;
+}
+
+QHeaderView::section::horizontal {
+	border-left: transparent;
+}
+
+QHeaderView[showSortIndicator="true"]::section::horizontal {
+	/* Same as the width of the arrow subcontrols below. */
+	padding-right: 0.8em;
+}
+
+QHeaderView::section:checked {
+	color: white;
+	background-color: #2A82DA;
+}
+
+/* Note that this doesn't work for QTreeView unless the header is clickable */
+QHeaderView::section:hover,
+QHeaderView::section::horizontal::first:hover,
+QHeaderView::section::horizontal::only-one:hover,
+QHeaderView::section::vertical::first:hover,
+QHeaderView::section::vertical::only-one:hover {
+	border: 0.04em solid #2A82DA;
+}