Skip to content

Commit

Permalink
New interface theme.
Browse files Browse the repository at this point in the history
  • Loading branch information
MaurycyLiebner committed Feb 25, 2021
1 parent 9640387 commit b0eb3c2
Show file tree
Hide file tree
Showing 47 changed files with 481 additions and 580 deletions.
1 change: 1 addition & 0 deletions src/app/GUI/BoxesList/boxsinglewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ BoxSingleWidget::BoxSingleWidget(BoxScroller * const parent) :

mBlendModeCombo = createCombo(this);
mMainLayout->addWidget(mBlendModeCombo);
mBlendModeCombo->setObjectName("blendModeCombo");

for(int modeId = int(SkBlendMode::kSrcOver);
modeId <= int(SkBlendMode::kLastMode); modeId++) {
Expand Down
1 change: 0 additions & 1 deletion src/app/GUI/BrushWidgets/brushlabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ BrushLabel::BrushLabel(BrushesContext* const ctxt) : TriggerLabel(nullptr) {
});
setStyleSheet("QWidget {"
"background: white;"
"border: 1px solid black;"
"}");
setFixedSize(48, 48);
}
Expand Down
1 change: 0 additions & 1 deletion src/app/GUI/RenderWidgets/renderwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ RenderWidget::RenderWidget(QWidget *parent) : QWidget(parent) {
mContLayout->setSpacing(0);
mContWidget->setLayout(mContLayout);
mScrollArea = new ScrollArea(this);
mScrollArea->setStyleSheet("QScrollArea { border-top: 1px solid black; }");
mScrollArea->setWidget(mContWidget);
mScrollArea->setWidgetResizable(true);
mScrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
Expand Down
2 changes: 1 addition & 1 deletion src/app/GUI/Settings/settingsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ SettingsDialog::SettingsDialog(QWidget * const parent) :
} catch(const std::exception& e) {
gPrintExceptionCritical(e);
}
statusBar->showMessage("Settings Applied", 1500);
statusBar->showMessage("Settings Applied, you might have to restart", 1500);
});

updateSettings();
Expand Down
4 changes: 2 additions & 2 deletions src/app/GUI/animationdockwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ AnimationDockWidget::AnimationDockWidget(QWidget *parent,
addWidget(selectedVisible);

setStyleSheet("QToolBar {"
"border: 1px solid black;"
"padding: 10px;"
"margin-bottom: -1px"
"margin-bottom: -1px;"
"border: 3px solid rgb(25, 25, 25);"
"}");
}

Expand Down
23 changes: 1 addition & 22 deletions src/app/GUI/animationwidgetscrollbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void FrameScrollBar::setCurrentCanvas(Canvas * const canvas) {

void FrameScrollBar::paintEvent(QPaintEvent *) {
QPainter p(this);
p.fillRect(rect(), QColor(60, 60, 60));
p.fillRect(rect(), QColor(25, 25, 25));

const int dFrame = mFrameRange.fMax - mFrameRange.fMin + (mRange ? 0 : 1);
if(dFrame <= 0) return;
Expand All @@ -62,23 +62,6 @@ void FrameScrollBar::paintEvent(QPaintEvent *) {
const int maxFrame = mFrameRange.fMax + f1;
const qreal w1 = width() - 1.5*eSizesUI::widget + f1*pixPerFrame - x0;

QRect canvasMinRect;
canvasMinRect.setLeft(qRound(x0));
canvasMinRect.setTop(0);
const int cRightFrames = mCanvasRange.fMin - minFrame;
canvasMinRect.setRight(qRound(x0 + cRightFrames*pixPerFrame));
canvasMinRect.setBottom(height());
p.fillRect(canvasMinRect, QColor(30, 30, 30));

QRect canvasMaxRect;
const int cLeftFrames = mCanvasRange.fMax - minFrame + (mRange ? 0 : 1);
const qreal left = cLeftFrames*pixPerFrame + x0;
canvasMaxRect.setLeft(qMax(0, qRound(left)));
canvasMaxRect.setTop(0);
canvasMaxRect.setWidth(width());
canvasMaxRect.setBottom(height());
p.fillRect(canvasMaxRect, QColor(30, 30, 30));

QColor col = mHandleColor;
if(mPressed) {
col.setHsv(col.hue(), col.saturation(), qMin(255, col.value() + 40));
Expand Down Expand Up @@ -139,10 +122,6 @@ void FrameScrollBar::paintEvent(QPaintEvent *) {
QString::number(mFirstViewedFrame));
}

p.setPen(QPen(Qt::black, 1));
if(mRange) p.drawLine(0, 0, width(), 0);
else p.drawLine(0, height() - 1, width(), height() - 1);

p.end();
}

Expand Down
2 changes: 0 additions & 2 deletions src/app/GUI/bookmarkedwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ BookmarkedWidget::BookmarkedWidget(const bool vertical,
QWidget(parent), mVertical(vertical), mDimension(dimension) {
mUpArrow = new QPushButton(this);
mDownArrow = new QPushButton(this);
mUpArrow->setObjectName("darkButton");
mDownArrow->setObjectName("darkButton");
if(mVertical) {
setFixedWidth(dimension);
mUpArrow->setFixedWidth(dimension);
Expand Down
4 changes: 2 additions & 2 deletions src/app/GUI/changewidthwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ void ChangeWidthWidget::paintEvent(QPaintEvent *) {
}

void ChangeWidthWidget::mouseMoveEvent(QMouseEvent *event) {
int newWidth = mCurrentWidth + event->x() - mPressX;
mCurrentWidth = clamp(newWidth, 10*eSizesUI::widget, 20*eSizesUI::widget);
const int newWidth = mCurrentWidth + event->x() - mPressX;
mCurrentWidth = clamp(newWidth, 10*eSizesUI::widget, 40*eSizesUI::widget);
emit widthSet(mCurrentWidth);
//mBoxesList->setFixedWidth(newWidth);
updatePos();
Expand Down
4 changes: 2 additions & 2 deletions src/app/GUI/keysview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ void KeysView::paintEvent(QPaintEvent *) {
else p.fillRect(rect(), QColor(60, 60, 60));

if(mPixelsPerFrame < 0.001) return;
if(!mGraphViewed) {
if(!mGraphViewed) {
int currY = eSizesUI::widget;
p.setPen(QPen(QColor(40, 40, 40), 1));
while(currY < height()) {
Expand Down Expand Up @@ -515,7 +515,7 @@ void KeysView::paintEvent(QPaintEvent *) {
drawKeys(&p, mPixelsPerFrame, viewedFrameRange);
p.restore();
if(mSelecting) {
p.setPen(QPen(Qt::blue, 2, Qt::DotLine));
p.setPen(QPen(Qt::white, 1.5, Qt::DotLine));
p.setBrush(Qt::NoBrush);
p.drawRect(QRectF((mSelectionRect.x() - mMinViewedFrame)*mPixelsPerFrame,
mSelectionRect.y() - mViewedTop,
Expand Down
14 changes: 10 additions & 4 deletions src/app/GUI/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,17 @@ MainWindow::MainWindow(Document& document,
setWindowIcon(QIcon(iconDir + "/enve.png"));
const auto downArr = iconDir + "/down-arrow.png";
const auto upArr = iconDir + "/up-arrow.png";
const auto dockClose = iconDir + "/dockClose.png";
const auto dockMaximize = iconDir + "/dockMaximize.png";

const QString iconSS =
"QComboBox::down-arrow { image: url(" + downArr + "); }" +
"QScrollBar::sub-line { image: url(" + upArr + "); }" +
"QScrollBar::add-line { image: url(" + downArr + "); }";
"QComboBox::down-arrow { image: url(" + downArr + "); }"
"QScrollBar::sub-line { image: url(" + upArr + "); }"
"QScrollBar::add-line { image: url(" + downArr + "); }"
"QDockWidget {"
"titlebar-close-icon: url(" + dockClose + ");"
"titlebar-normal-icon: url(" + dockMaximize + ");"
"}";

QFile customSS(eSettings::sSettingsDir() + "/stylesheet.qss");
if(customSS.exists()) {
Expand Down Expand Up @@ -835,7 +842,6 @@ void MainWindow::updateSettingsForCurrentCanvas(Canvas* const scene) {
#include <QSpacerItem>
void MainWindow::setupStatusBar() {
mUsageWidget = new UsageWidget(this);
mUsageWidget->setStyleSheet("QStatusBar { border-top: 1px solid black; }");
setStatusBar(mUsageWidget);
}

Expand Down
18 changes: 0 additions & 18 deletions src/app/GUI/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,24 +57,6 @@ class CloseSignalingDockWidget;
class PaintColorWidget;
//class SoundComposition;

const QString MENU_STYLESHEET =
"QMenu {\
background-color: rgb(255, 255, 255);\
border: 1px solid black;\
}\
\
QMenu::item {\
spacing: 3px;\
padding: 2px 25px 2px 25px;\
background: transparent;\
color: black;\
}\
\
QMenu::item:selected {\
background-color: rgb(200, 200, 200);\
color: black;\
};";

class MainWindow : public QMainWindow {
Q_OBJECT
public:
Expand Down
14 changes: 3 additions & 11 deletions src/app/GUI/timelinewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,23 +170,15 @@ TimelineWidget::TimelineWidget(Document &document,
connect(mGraphAct, &QAction::toggled,
this, &TimelineWidget::setGraphEnabled);

mCornerMenuBar->setStyleSheet("QWidget#menuBarWidget {"
"border-right: 1px solid black;"
"}");
mCornerMenuBar->setContentsMargins(0, 0, 1, 0);

mSearchLine = new QLineEdit("", mBoxesListMenuBar);
mSearchLine->setMinimumHeight(0);
mSearchLine->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
MainWindow::sGetInstance()->installLineFilter(mSearchLine);
mSearchLine->setStyleSheet("background-color: white;"
"color: black;"
"border-radius: 0;"
"border: 0;"
"border-right: 1px solid black;"
"border-left: 1px solid black;"
"border-bottom: 1px solid black;"
"margin: 0;");
mSearchLine->setStyleSheet("border-radius: 0;"
"border: 0;");
mSearchLine->setPlaceholderText("search");
connect(mSearchLine, &QLineEdit::textChanged,
this, &TimelineWidget::setSearchText);
mSearchLine->setFocusPolicy(Qt::ClickFocus);
Expand Down
4 changes: 2 additions & 2 deletions src/app/GUI/tipswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ TipsWidget::TipsWidget(QWidget* const parent) : QWidget(parent) {

const QString iconsDir = eSettings::sIconsDir();

const QIcon leftIcon(iconsDir + "/left-arrow-black.png");
const QIcon leftIcon(iconsDir + "/left-arrow.png");
const auto leftButton = new QPushButton(leftIcon, "");
leftButton->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
connect(leftButton, &QPushButton::released,
Expand All @@ -42,7 +42,7 @@ TipsWidget::TipsWidget(QWidget* const parent) : QWidget(parent) {
mNumber->setAlignment(Qt::AlignCenter);
titleLayout->addWidget(mNumber);

const QIcon rightIcon(iconsDir + "/right-arrow-black.png");
const QIcon rightIcon(iconsDir + "/right-arrow.png");
const auto rightButton = new QPushButton(rightIcon, "");
rightButton->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
connect(rightButton, &QPushButton::released,
Expand Down
14 changes: 7 additions & 7 deletions src/app/icons/capFlat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions src/app/icons/capRound.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions src/app/icons/capSquare.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b0eb3c2

Please sign in to comment.