reworked css

This commit is contained in:
itsmattkc
2019-07-14 11:28:19 -04:00
parent 4cfa7489ea
commit df32b881c2
10 changed files with 75 additions and 138 deletions
@@ -1,3 +1,5 @@
#!/bin/sh
# Olive - Non-Linear Video Editor
# Copyright (C) 2019 Olive Team
#
-3
View File
@@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8">
<path style="fill: #ffffff;"d="M0 0v1c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1v1h5.5c1.38 0 2.5-1.12 2.5-2.5 0-1-.59-1.85-1.44-2.25.27-.34.44-.78.44-1.25 0-1.1-.89-2-2-2h-5zm3 1h1c.55 0 1 .45 1 1s-.45 1-1 1h-1v-2zm0 3h1.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-1.5v-3z" />
</svg>

Before

Width:  |  Height:  |  Size: 354 B

+8
View File
@@ -0,0 +1,8 @@
#!/bin/sh
for f in *.svg
do
FNBASE=$(basename -s .svg $f)
sed -e "s/#ffffff/#000000/" $f > $FNBASE-dark.svg
done
+14 -45
View File
@@ -36,64 +36,33 @@
**/
/* Default widget colors */
QWidget {
QWidget, QMenu::separator {
background: #353535;
color: #ffffff;
}
/* Default highlight colors */
QWidget::selected {
background: #2a82da;
color: #ffffff;
}
/* Default disabled colors */
QWidget::disabled {
color: #808080;
}
/* Default highlight colors */
QWidget::selected {
background: #2a82da;
color: #ffffff;
}
/* Default link color */
a {
color: #2a82da;
}
/* Item views use a darker background color */
QAbstractItemView {
/* PanelWidget focus border color */
PanelWidget {
qproperty-border: #2a82da;
}
/* All of these widgets' backgrounds are dark */
QTreeView, QListView, QLineEdit, QMenu, QProgressBar, QPushButton::checked, NodeView {
background: #191919;
}
/* Other children of QAbstractItemView (e.g. headers) should use the original background however */
QAbstractItemView * {
background: #353535;
}
/* QLineEdit background is dark */
QLineEdit {
background: #191919;
}
/* QMenu background is dark */
QMenu {
background: #191919;
}
/* QProgressBar background is dark */
QProgressBar {
background: #191919;
}
/* Ensure QPushButtons look dark when checked */
QPushButton::checked {
background: #191919;
}
/* Ensure QMenu separators stand out */
QMenu::separator {
background: #353535;
}
/* ToolTips use dark */
QToolTip {
background: #191919;;
color: #ffffff;
}
+13 -44
View File
@@ -36,64 +36,33 @@
**/
/* Default widget colors */
QWidget {
QWidget, QMenu::separator {
background: #d0d0d0;
color: #000000;
}
/* Default disabled colors */
QWidget::disabled {
color: #808080;
}
/* Default highlight colors */
QWidget::selected {
background: #2a82da;
color: #ffffff;
}
/* Default disabled colors */
QWidget::disabled {
color: #808080;
}
/* Default link color */
a {
color: #2a82da;
}
/* Item views use a darker background color */
QAbstractItemView {
/* PanelWidget focus border color */
PanelWidget {
qproperty-border: #2a82da;
}
/* All of these widgets' backgrounds are dark */
QTreeView, QListView, QLineEdit, QMenu, QProgressBar, QPushButton::checked, NodeView {
background: #f0f0f0;
}
/* Other children of QAbstractItemView (e.g. headers) should use the original background however */
QAbstractItemView * {
background: #d0d0d0;
}
/* QLineEdit background is dark */
QLineEdit {
background: #f0f0f0;
}
/* QMenu background is dark */
QMenu {
background: #f0f0f0;
}
/* QProgressBar background is dark */
QProgressBar {
background: #f0f0f0;
}
/* Ensure QPushButtons look dark when checked */
QPushButton::checked {
background: #f0f0f0;
}
/* Ensure QMenu separators stand out */
QMenu::separator {
background: #d0d0d0;
}
/* ToolTips use dark */
QToolTip {
background: #f0f0f0;;
color: #000000;
}
+13 -44
View File
@@ -36,64 +36,33 @@
**/
/* Default widget colors */
QWidget {
QWidget, QMenu::separator {
background: #808080;
color: #000000;
}
/* Default disabled colors */
QWidget::disabled {
color: #808080;
}
/* Default highlight colors */
QWidget::selected {
background: #2a82da;
color: #ffffff;
}
/* Default disabled colors */
QWidget::disabled {
color: #808080;
}
/* Default link color */
a {
color: #2a82da;
}
/* Item views use a darker background color */
QAbstractItemView {
/* PanelWidget focus border color */
PanelWidget {
qproperty-border: #2a82da;
}
/* All of these widgets' backgrounds are dark */
QTreeView, QListView, QLineEdit, QMenu, QProgressBar, QPushButton::checked, NodeView {
background: #c0c0c0;
}
/* Other children of QAbstractItemView (e.g. headers) should use the original background however */
QAbstractItemView * {
background: #808080;
}
/* QLineEdit background is dark */
QLineEdit {
background: #c0c0c0;
}
/* QMenu background is dark */
QMenu {
background: #c0c0c0;
}
/* QProgressBar background is dark */
QProgressBar {
background: #c0c0c0;
}
/* Ensure QPushButtons look dark when checked */
QPushButton::checked {
background: #c0c0c0;
}
/* Ensure QMenu separators stand out */
QMenu::separator {
background: #808080;
}
/* ToolTips use dark */
QToolTip {
background: #c0c0c0;;
color: #000000;
}
+1 -1
View File
@@ -33,7 +33,7 @@ void olive::style::AppSetDefault()
qApp->setStyle(QStyleFactory::create("Fusion"));
// Set CSS style for this
QFile css_file(":/css/olive-dark.css");
QFile css_file(":/css/olive-light.css");
if (css_file.open(QFile::ReadOnly | QFile::Text)) {
// Read in entire CSS from file and set as the application stylesheet
+1
View File
@@ -27,6 +27,7 @@
class NodeView : public QGraphicsView
{
Q_OBJECT
public:
NodeView(QWidget* parent);
+16 -1
View File
@@ -21,6 +21,9 @@
#include "panel.h"
#include <QPainter>
#include <QStyle>
#include <QStyleOption>
#include <QVariant>
PanelWidget::PanelWidget(QWidget *parent) :
QDockWidget(parent),
@@ -32,6 +35,7 @@ PanelWidget::PanelWidget(QWidget *parent) :
void PanelWidget::SetBorderVisible(bool enabled)
{
border_visible_ = enabled;
update();
}
@@ -63,7 +67,8 @@ void PanelWidget::paintEvent(QPaintEvent *event)
highlight_border.adjust(0, 0, -1, -1);
// Set the color to the palette's highlight color
p.setPen(QPen(palette().highlight().color()));
p.setPen(QPen(border_color_));
// Draw the highlight border
p.drawRect(highlight_border);
@@ -80,3 +85,13 @@ void PanelWidget::UpdateTitle()
setWindowTitle(tr("%1: %2").arg(title_, subtitle_));
}
}
QColor PanelWidget::GetBorderColor()
{
return border_color_;
}
void PanelWidget::SetBorderColor(QColor c)
{
border_color_ = c;
}
+7
View File
@@ -29,6 +29,7 @@
*/
class PanelWidget : public QDockWidget {
Q_OBJECT
Q_PROPERTY(QColor border READ GetBorderColor WRITE SetBorderColor DESIGNABLE true)
public:
/**
* @brief PanelWidget Constructor
@@ -88,6 +89,12 @@ private:
*/
void UpdateTitle();
QColor GetBorderColor();
void SetBorderColor(QColor c);
QColor border_color_;
/**
* @brief Internal title string
*/