From 9637b030c1ff6370899e560c383e276101a4a397 Mon Sep 17 00:00:00 2001 From: Nighty3098 <154594695+Nighty3098@users.noreply.github.com> Date: Wed, 17 Jul 2024 23:26:48 +0700 Subject: [PATCH 1/5] Added hover effect for QTabWidget button --- src/CodeKeeper/keeperFunc/functional.cpp | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/CodeKeeper/keeperFunc/functional.cpp b/src/CodeKeeper/keeperFunc/functional.cpp index 85c3a020..548b8d97 100644 --- a/src/CodeKeeper/keeperFunc/functional.cpp +++ b/src/CodeKeeper/keeperFunc/functional.cpp @@ -535,10 +535,18 @@ void MainWindow::setStyle(QFont* selectedFont, int* font_size_int) openAccountWindow->setFont(*selectedFont); openAccountWindow->setStyleSheet("QPushButton {border: none; background-color: transparent; font-size: " + font_size + "pt;} "); - mainTabButton->setStyleSheet("background-color: transparent; border: none;"); - tasksTabButton->setStyleSheet("background-color: transparent; border: none;"); - notesTabButton->setStyleSheet("background-color: transparent; border: none;"); - projectsTabButton->setStyleSheet("background-color: transparent; border: none;"); + mainTabButton->setStyleSheet("QPushButton {background-color: transparent; border: none;} QPushButton:pressed {background-color: transparent; " + "border: none;} QPushButton:focus{border: none; background-color: transparent; border-right: 5px solid #36bcf7;} " + "QPushButton:hover{border: none; background-color: transparent; border-right: 5px solid #36bcf7;}"); + tasksTabButton->setStyleSheet("QPushButton {background-color: transparent; border: none;} QPushButton:pressed {background-color: transparent; " + "border: none;} QPushButton:focus{border: none; background-color: transparent; border-right: 5px solid #36bcf7;} " + "QPushButton:hover{border: none; background-color: transparent; border-right: 5px solid #36bcf7;}"); + notesTabButton->setStyleSheet("QPushButton {background-color: transparent; border: none;} QPushButton:pressed {background-color: transparent; " + "border: none;} QPushButton:focus{border: none; background-color: transparent; border-right: 5px solid #36bcf7;} " + "QPushButton:hover{border: none; background-color: transparent; border-right: 5px solid #36bcf7;}"); + projectsTabButton->setStyleSheet("QPushButton {background-color: transparent; border: none;} QPushButton:pressed {background-color: transparent; " + "border: none;} QPushButton:focus{border: none; background-color: transparent; border-right: 5px solid " + "#36bcf7;} QPushButton:hover{border: none; background-color: transparent; border-right: 5px solid #36bcf7;}"); setH1B->setStyleSheet("background-color: transparent; border: none; margin-left: 4px;"); setH2B->setStyleSheet("background-color: transparent; border: none; margin-left: 4px;"); @@ -575,9 +583,11 @@ void MainWindow::setStyle(QFont* selectedFont, int* font_size_int) setQuoteB->setToolTip("
Set quote
"); - menuButton->setStyleSheet("background-color: transparent; border: none;"); + menuButton->setStyleSheet("border: 5px; border-radius: 10px;"); - tasksMenuBtn->setStyleSheet("background-color: transparent; border: none; border-width: 0px;"); + tasksMenuBtn->setStyleSheet("border: 5px; border-radius: 10px;"); + + projectsMenuButton->setStyleSheet("border: 5px; border-radius: 10px;"); isAutoSync->setStyleSheet("border: 0px; background-color: transparent;"); @@ -591,8 +601,6 @@ void MainWindow::setStyle(QFont* selectedFont, int* font_size_int) nsProjects->setStyleSheet("font-size: " + font_size + "px;"); - projectsMenuButton->setStyleSheet("background-color: transparent; border: none; border-width: 0px;"); - label_3->setStyleSheet("font-size: " + font_size + "px;"); label_2->setStyleSheet("font-size: " + font_size + "px;"); From e46e4566e4166b7b8f86e2761b1ae92eb265fb35 Mon Sep 17 00:00:00 2001 From: Nighty3098 <154594695+Nighty3098@users.noreply.github.com> Date: Thu, 18 Jul 2024 07:27:39 +0700 Subject: [PATCH 2/5] Fix bug --- src/CodeKeeper/keeperFunc/functional.cpp | 2 +- src/CodeKeeper/mainwindow.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CodeKeeper/keeperFunc/functional.cpp b/src/CodeKeeper/keeperFunc/functional.cpp index 548b8d97..cf842229 100644 --- a/src/CodeKeeper/keeperFunc/functional.cpp +++ b/src/CodeKeeper/keeperFunc/functional.cpp @@ -172,7 +172,7 @@ void MainWindow::createCustomTitlebar() if (isCustomTitlebar) { this->setWindowFlags(windowFlags() | Qt::FramelessWindowHint); - + winControlL->addWidget(closeBtn); winControlL->addWidget(minimizeBtn); winControlL->addWidget(maximizeBtn); diff --git a/src/CodeKeeper/mainwindow.cpp b/src/CodeKeeper/mainwindow.cpp index 1b66e1da..d3d2526f 100644 --- a/src/CodeKeeper/mainwindow.cpp +++ b/src/CodeKeeper/mainwindow.cpp @@ -500,6 +500,7 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent) connectionTimer->start(100); // 1000ms = 1s } else { + sizeGrip2->hide(); } isConnected = new QPushButton(""); From 5a512bafa412e00cd6db3759ae04d13e61871059 Mon Sep 17 00:00:00 2001 From: Nighty3098 <154594695+Nighty3098@users.noreply.github.com> Date: Thu, 18 Jul 2024 16:25:34 +0700 Subject: [PATCH 3/5] Working --- README.md | 11 ++++++++++- imgs/custom_theme.png | Bin 0 -> 93980 bytes imgs/default_theme.png | Bin 0 -> 89132 bytes src/CodeKeeper/keeperFunc/addConnects.cpp | 5 +++++ src/CodeKeeper/keeperFunc/functional.cpp | 20 ++++++-------------- src/CodeKeeper/mainwindow.cpp | 5 ----- src/resources/note.png | Bin 6397 -> 7194 bytes 7 files changed, 21 insertions(+), 20 deletions(-) create mode 100644 imgs/custom_theme.png create mode 100644 imgs/default_theme.png diff --git a/README.md b/README.md index c52b5d5a..b849d681 100644 --- a/README.md +++ b/README.md @@ -185,7 +185,16 @@ -uW3&ch6CTiynIfIRsycjJDq$D
zrEYu7xznO7ZxBx%HiOvg@zw|lU}2w s$g+8_R KKO&1?eHZvL*T)-`1J8SkT?6i(W3jAxJi
z(Oe#PHsT^Yoy9Na;ZXYX_2V&SX&7fLuBdbpVo71hFF}NpplPmmx%ukY^F#3dQKF&PD
zJ1`f(p!{z{aa$nkVt-W3V*m2xF8(CwOxvhLmeNb)<6G*tFY1SENg!&}L?xXRyi9uZ
zg;AhftCC2Qh>K&PGH{{dMziup(~j7Aea?t-`x!ls75uQt=GT!uT622lYH@>T=Xl9=
z*Q-L#RJtXae5+9TB3A|m8=tX>uBy?Hzg?Qy+BAKM7qIq^KB>wuRWY17(CVQdqJWA+
zfnl#E=f^DO3$z(vFuKRUvH17tq{;Pc5QY7G*7^^mVR3r^im0gntJkI()BNNj|Mnw(
zJkj9(_bT^$;s12Sl@yWqH{xIw%F{^xN6*9qe=7X^&k!{6VX^-i|7Vs`{Qo#pdD;K<
z)s(3IUrjYXat-sk+%3q(!F
A%t+=*-EAHyXjBu3;4rcU8DJE6j5dnI+DS?(R
z>vim^wHJU3wiP7rWu_J%-3nRe6JA_p_EG9-Jw-W$
TnFzjal5l%Fr>HFPO4NKt7%U;CsQK|HhY2Ru?
i&60D86O&kPTfncw4Eeg=`
z<0}(GDisNb!hhgO8$D62g*pP6&3F)?l@RuZ
p2#>o+I}`ak=*jNl_X5|s
z-e-zeYiZFBe!|TUnI2`=&9FRMY$T$59P{$^V=0H)l^2