From d2102a77e93eb6d319326564568e85e18f4f6904 Mon Sep 17 00:00:00 2001 From: Pablo Gil Date: Sat, 14 Dec 2024 11:16:10 +0100 Subject: [PATCH 1/5] fix qss errors --- src/app/friction.qss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/friction.qss b/src/app/friction.qss index 2e184ce35..149f2b03e 100644 --- a/src/app/friction.qss +++ b/src/app/friction.qss @@ -447,8 +447,8 @@ QToolBar#animationDockWidget QPushButton { border-color: %2; } -QToolBar#animationDockWidget QToolButton::hover, -QToolBar#animationDockWidget QPushButton::hover { +QToolBar#animationDockWidget QToolButton:hover, +QToolBar#animationDockWidget QPushButton:hover { border-color: %4; } From a92d442db8ae5a73c810bd9ac188f9150a512aba Mon Sep 17 00:00:00 2001 From: Pablo Gil Date: Sat, 14 Dec 2024 11:21:05 +0100 Subject: [PATCH 2/5] remove hover state too SpinBoxNoButtons --- src/app/friction.qss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/friction.qss b/src/app/friction.qss index 149f2b03e..a970c2d38 100644 --- a/src/app/friction.qss +++ b/src/app/friction.qss @@ -81,6 +81,10 @@ QSpinBox#SpinBoxNoButtons::down-button { width: 0; height: 0; } +QSpinBox#SpinBoxNoButtons:hover { + background-color: %3; + border-color: %3; +} QTabWidget#TabWidgetCenter::tab-bar { alignment: center; From 2c35959ea5d143e94c187119c6e8c1d31971c0a9 Mon Sep 17 00:00:00 2001 From: Pablo Gil Date: Sat, 14 Dec 2024 11:31:34 +0100 Subject: [PATCH 3/5] rearrange Preview buttons --- src/app/GUI/timelinedockwidget.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/app/GUI/timelinedockwidget.cpp b/src/app/GUI/timelinedockwidget.cpp index 17725049c..64114e741 100644 --- a/src/app/GUI/timelinedockwidget.cpp +++ b/src/app/GUI/timelinedockwidget.cpp @@ -230,8 +230,6 @@ TimelineDockWidget::TimelineDockWidget(Document& document, mRenderProgress->setFixedWidth(mCurrentFrameSpin->width()); mRenderProgress->setFormat(tr("Cache %p%")); - mToolBar->addWidget(mFrameStartSpin); - eSizesUI::widget.add(mToolBar, [this](const int size) { //mRenderProgress->setFixedHeight(eSizesUI::button); mToolBar->setIconSize(QSize(size, size)); @@ -244,13 +242,11 @@ TimelineDockWidget::TimelineDockWidget(Document& document, mToolBar->addAction(mFrameRewindAct); mToolBar->addAction(mPrevKeyframeAct); - mToolBar->addAction(mNextKeyframeAct); - mToolBar->addAction(mFrameFastForwardAct); - mRenderProgressAct = mToolBar->addWidget(mRenderProgress); - mCurrentFrameSpinAct = mToolBar->addWidget(mCurrentFrameSpin); mToolBar->addAction(mPlayFromBeginningButton); mToolBar->addAction(mPlayButton); mToolBar->addAction(mStopButton); + mToolBar->addAction(mNextKeyframeAct); + mToolBar->addAction(mFrameFastForwardAct); mToolBar->addAction(mLoopButton); mMainWindow->cmdAddAction(mFrameRewindAct); @@ -269,8 +265,14 @@ TimelineDockWidget::TimelineDockWidget(Document& document, QSizePolicy::Minimum); mToolBar->addWidget(spacerWidget2); + mToolBar->addWidget(mFrameStartSpin); + mToolBar->addWidget(mCurrentFrameSpin); + mRenderProgressAct = mToolBar->addWidget(mRenderProgress); + mCurrentFrameSpinAct = mToolBar->addWidget(mCurrentFrameSpin); mToolBar->addWidget(mFrameEndSpin); + mRenderProgressAct->setVisible(false); + mMainLayout->addWidget(mToolBar); mMainLayout->addSpacing(2); From 2c4917fd1256189e3273f961101be06bbcb86828 Mon Sep 17 00:00:00 2001 From: Pablo Gil Date: Sat, 14 Dec 2024 11:32:41 +0100 Subject: [PATCH 4/5] qss spacing for some icons --- src/app/GUI/timelinedockwidget.cpp | 13 ++++++++++++- src/app/friction.qss | 12 ++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/app/GUI/timelinedockwidget.cpp b/src/app/GUI/timelinedockwidget.cpp index 64114e741..6d3f8967e 100644 --- a/src/app/GUI/timelinedockwidget.cpp +++ b/src/app/GUI/timelinedockwidget.cpp @@ -258,7 +258,18 @@ TimelineDockWidget::TimelineDockWidget(Document& document, mMainWindow->cmdAddAction(mStopButton); mMainWindow->cmdAddAction(mLoopButton); - mRenderProgressAct->setVisible(false); + QToolButton* nextKeyframeButton = qobject_cast(mToolBar->widgetForAction(mNextKeyframeAct)); + if (nextKeyframeButton) { + nextKeyframeButton->setObjectName("NextKeyframeButton"); + } + QToolButton* prevKeyframeButton = qobject_cast(mToolBar->widgetForAction(mPrevKeyframeAct)); + if (prevKeyframeButton) { + prevKeyframeButton->setObjectName("PrevKeyframeButton"); + } + QToolButton* LoopButton = qobject_cast(mToolBar->widgetForAction(mLoopButton)); + if (LoopButton) { + LoopButton->setObjectName("LoopButton"); + } QWidget *spacerWidget2 = new QWidget(this); spacerWidget2->setSizePolicy(QSizePolicy::Expanding, diff --git a/src/app/friction.qss b/src/app/friction.qss index a970c2d38..25114f3f5 100644 --- a/src/app/friction.qss +++ b/src/app/friction.qss @@ -634,3 +634,15 @@ Friction--Ui--ToolBar::separator:vertical { Friction--Ui--ToolBar::separator:horizontal { width: 1px; } + +QToolButton#PrevKeyframeButton { + margin-right: %10; +} + +QToolButton#NextKeyframeButton { + margin-left: %10; +} + +QToolButton#LoopButton { + margin-left: %7; +} \ No newline at end of file From 07db74e9446041512c3405a7474b1d9df024384e Mon Sep 17 00:00:00 2001 From: Pablo Gil Date: Sat, 14 Dec 2024 11:33:46 +0100 Subject: [PATCH 5/5] temporal local icon tests --- src/app/GUI/timelinedockwidget.cpp | 36 ++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/src/app/GUI/timelinedockwidget.cpp b/src/app/GUI/timelinedockwidget.cpp index 6d3f8967e..e08f61cbe 100644 --- a/src/app/GUI/timelinedockwidget.cpp +++ b/src/app/GUI/timelinedockwidget.cpp @@ -82,7 +82,8 @@ TimelineDockWidget::TimelineDockWidget(Document& document, mMainLayout->setSpacing(0); mMainLayout->setMargin(0); - mFrameRewindAct = new QAction(QIcon::fromTheme("rewind"), + // mFrameRewindAct = new QAction(QIcon::fromTheme("rewind"), + mFrameRewindAct = new QAction(QIcon("/Users/pablo/GitHub/friction-icon-theme_pablo/hicolor/scalable/friction/preview_rewind.png"), tr("Rewind"), this); mFrameRewindAct->setShortcut(QKeySequence(AppSupport::getSettings("shortcuts", @@ -97,7 +98,8 @@ TimelineDockWidget::TimelineDockWidget(Document& document, mDocument.actionFinished(); }); - mFrameFastForwardAct = new QAction(QIcon::fromTheme("fastforward"), + // mFrameFastForwardAct = new QAction(QIcon::fromTheme("fastforward"), + mFrameFastForwardAct = new QAction(QIcon("/Users/pablo/GitHub/friction-icon-theme_pablo/hicolor/scalable/friction/preview_fastforward.png"), tr("Fast Forward"), this); mFrameFastForwardAct->setShortcut(QKeySequence(AppSupport::getSettings("shortcuts", @@ -112,7 +114,8 @@ TimelineDockWidget::TimelineDockWidget(Document& document, mDocument.actionFinished(); }); - mPlayFromBeginningButton = new QAction(QIcon::fromTheme("preview"), + // mPlayFromBeginningButton = new QAction(QIcon::fromTheme("preview"), + mPlayFromBeginningButton = new QAction(QIcon("/Users/pablo/GitHub/friction-icon-theme_pablo/hicolor/scalable/friction/preview_play-from-start.png"), tr("Play Preview From Start"), this); connect(mPlayFromBeginningButton, &QAction::triggered, @@ -125,18 +128,21 @@ TimelineDockWidget::TimelineDockWidget(Document& document, setPreviewFromStart(state); }); - mPlayButton = new QAction(QIcon::fromTheme("play"), + // mPlayButton = new QAction(QIcon::fromTheme("play"), + mPlayButton = new QAction(QIcon("/Users/pablo/GitHub/friction-icon-theme_pablo/hicolor/scalable/friction/preview_play.png"), tr("Play Preview"), this); - mStopButton = new QAction(QIcon::fromTheme("stop"), + // mStopButton = new QAction(QIcon::fromTheme("stop"), + mStopButton = new QAction(QIcon("/Users/pablo/GitHub/friction-icon-theme_pablo/hicolor/scalable/friction/preview_stop.png"), tr("Stop Preview"), this); connect(mStopButton, &QAction::triggered, this, &TimelineDockWidget::interruptPreview); - mLoopButton = new QAction(QIcon::fromTheme("loop3"), + // mLoopButton = new QAction(QIcon::fromTheme("loop3"), + mLoopButton = new QAction(QIcon("/Users/pablo/GitHub/friction-icon-theme_pablo/hicolor/scalable/friction/preview_loop3.png"), tr("Loop Preview"), this); mLoopButton->setCheckable(true); @@ -197,7 +203,8 @@ TimelineDockWidget::TimelineDockWidget(Document& document, mCurrentFrameSpin->setRange(-INT_MAX, INT_MAX); mCurrentFrameSpin->setReadOnly(true); - const auto mPrevKeyframeAct = new QAction(QIcon::fromTheme("prev_keyframe"), + // const auto mPrevKeyframeAct = new QAction(QIcon::fromTheme("prev_keyframe"), + const auto mPrevKeyframeAct = new QAction(QIcon("/Users/pablo/GitHub/friction-icon-theme_pablo/hicolor/scalable/friction/preview_prev-keyframe.png"), QString(), this); mPrevKeyframeAct->setToolTip(tr("Previous Keyframe")); @@ -209,7 +216,8 @@ TimelineDockWidget::TimelineDockWidget(Document& document, } }); - const auto mNextKeyframeAct = new QAction(QIcon::fromTheme("next_keyframe"), + // const auto mNextKeyframeAct = new QAction(QIcon::fromTheme("next_keyframe"), + const auto mNextKeyframeAct = new QAction(QIcon("/Users/pablo/GitHub/friction-icon-theme_pablo/hicolor/scalable/friction/preview_next-keyframe.png"), QString(), this); mNextKeyframeAct->setToolTip(tr("Next Keyframe")); @@ -409,7 +417,8 @@ void TimelineDockWidget::previewFinished() showRenderStatus(false); mPlayFromBeginningButton->setDisabled(false); mStopButton->setDisabled(true); - mPlayButton->setIcon(QIcon::fromTheme("play")); + // mPlayButton->setIcon(QIcon::fromTheme("play")); + mPlayButton->setIcon(QIcon("/Users/pablo/GitHub/friction-icon-theme_pablo/hicolor/scalable/friction/preview_play.png")); mPlayButton->setText(tr("Play Preview")); disconnect(mPlayButton, nullptr, this, nullptr); connect(mPlayButton, &QAction::triggered, @@ -424,7 +433,8 @@ void TimelineDockWidget::previewBeingPlayed() showRenderStatus(false); mPlayFromBeginningButton->setDisabled(true); mStopButton->setDisabled(false); - mPlayButton->setIcon(QIcon::fromTheme("pause")); + // mPlayButton->setIcon(QIcon::fromTheme("pause")); + mPlayButton->setIcon(QIcon("/Users/pablo/GitHub/friction-icon-theme_pablo/hicolor/scalable/friction/preview_pause.png")); mPlayButton->setText(tr("Pause Preview")); disconnect(mPlayButton, nullptr, this, nullptr); connect(mPlayButton, &QAction::triggered, @@ -439,7 +449,8 @@ void TimelineDockWidget::previewBeingRendered() showRenderStatus(true); mPlayFromBeginningButton->setDisabled(true); mStopButton->setDisabled(false); - mPlayButton->setIcon(QIcon::fromTheme("play")); + // mPlayButton->setIcon(QIcon::fromTheme("play")); + mPlayButton->setIcon(QIcon("/Users/pablo/GitHub/friction-icon-theme_pablo/hicolor/scalable/friction/preview_play.png")); mPlayButton->setText(tr("Play Preview")); disconnect(mPlayButton, nullptr, this, nullptr); connect(mPlayButton, &QAction::triggered, @@ -454,7 +465,8 @@ void TimelineDockWidget::previewPaused() showRenderStatus(false); mPlayFromBeginningButton->setDisabled(true); mStopButton->setDisabled(false); - mPlayButton->setIcon(QIcon::fromTheme("play")); + // mPlayButton->setIcon(QIcon::fromTheme("play")); + mPlayButton->setIcon(QIcon("/Users/pablo/GitHub/friction-icon-theme_pablo/hicolor/scalable/friction/preview_play.png")); mPlayButton->setText(tr("Resume Preview")); disconnect(mPlayButton, nullptr, this, nullptr); connect(mPlayButton, &QAction::triggered,