Permalink
Browse files

Dark Mode (#321)

* Switch otioview to have a dark mode
  • Loading branch information...
boredstiff authored and jminor committed Sep 29, 2018
1 parent 1709ca8 commit bb0a380ff9b2b1d5c352cf89b16e0c36faa7a266
@@ -33,6 +33,7 @@
import opentimelineio as otio
import opentimelineview as otioViewWidget
from opentimelineview import settings
def _parsed_args():
@@ -125,6 +126,8 @@ def __init__(self, adapter_argument_map, *args, **kwargs):
self.details_widget.set_item
)
self.setStyleSheet(settings.VIEW_STYLESHEET)
def _file_load(self):
start_folder = None
if self._current_file is not None:
@@ -38,7 +38,7 @@ def __init__(self, *args, **kwargs):
self.font.setPointSize(12)
self.setFont(self.font)
self.backgroundColor = QtGui.QColor(43, 43, 43)
self.backgroundColor = QtGui.QColor(33, 33, 33)
self.textColor = QtGui.QColor(180, 180, 180)
self.highlightColor = QtGui.QColor(255, 198, 109)
self.keywordColor = QtGui.QColor(204, 120, 50)
@@ -0,0 +1,75 @@
VIEW_STYLESHEET = """
QMainWindow {
background-color: rgb(27, 27, 27);
}
QScrollBar:horizontal {
background: rgb(21, 21, 21);
height: 15px;
margin: 0px 20px 0 20px;
}
QScrollBar::handle:horizontal {
background: rgb(255, 83, 112);
min-width: 20px;
}
QScrollBar::add-line:horizontal {
background: rgb(33, 33, 33);
width: 20px;
subcontrol-position: right;
subcontrol-origin: margin;
}
QScrollBar::sub-line:horizontal {
background: rgb(33, 33, 33);
width: 20px;
subcontrol-position: left;
subcontrol-origin: margin;
}
QScrollBar:left-arrow:horizontal, QScrollBar::right-arrow:horizontal {
width: 3px;
height: 3px;
background: transparent;
}
QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {
background: none;
}
QScrollBar:vertical {
background: rgb(21, 21, 21);
width: 15px;
margin: 22px 0 22px 0;
}
QScrollBar::handle:vertical {
background: rgb(255, 83, 112);
min-height: 20px;
}
QScrollBar::add-line:vertical {
background: rgb(33, 33, 33);
height: 20px;
subcontrol-position: bottom;
subcontrol-origin: margin;
}
QScrollBar::sub-line:vertical {
background: rgb(33, 33, 33);
height: 20px;
subcontrol-position: top;
subcontrol-origin: margin;
}
QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical {
width: 3px;
height: 3px;
background: transparent;
}
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
background: none;
}
"""
@@ -353,8 +353,7 @@ class CompositionWidget(QtWidgets.QGraphicsScene):
def __init__(self, composition, *args, **kwargs):
super(CompositionWidget, self).__init__(*args, **kwargs)
self.composition = composition
self.setBackgroundBrush(QtGui.QBrush(QtGui.QColor(64, 78, 87, 255)))
self.setBackgroundBrush(QtGui.QBrush(QtGui.QColor(33, 33, 33)))
self._adjust_scene_size()
self._add_time_slider()
@@ -507,7 +506,7 @@ def __init__(self, stack, *args, **kwargs):
self.setTransformationAnchor(QtWidgets.QGraphicsView.AnchorUnderMouse)
self.setScene(CompositionWidget(stack, parent=self))
self.setAlignment((QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop))
self.setStyleSheet('border: 0px;')
self.scene().selectionChanged.connect(self.parse_selection_change)
def parse_selection_change(self):

0 comments on commit bb0a380

Please sign in to comment.