Skip to content

Commit

Permalink
Style: fix tutorial buttons and tab bars
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Popa <[email protected]>
  • Loading branch information
andrei47w committed Oct 30, 2024
1 parent 1142c2c commit 562d9b5
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 36 deletions.
7 changes: 3 additions & 4 deletions gui/src/widgets/popupwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

#include "widgets/popupwidget.h"

#include <style.h>
#include "stylehelper.h"

using namespace scopy;
Expand All @@ -41,7 +41,6 @@ PopupWidget::~PopupWidget() { delete m_tintedOverlay; }
void PopupWidget::initUI()
{
this->setObjectName("PopupWidget");
this->setStyleSheet("");
this->resize(500, 300);
auto verticalLayout = new QVBoxLayout(this);
this->setLayout(verticalLayout);
Expand Down Expand Up @@ -77,8 +76,8 @@ void PopupWidget::initUI()
backgroundWidget->setLayout(backgroundLayout);

StyleHelper::TutorialChapterTitleLabel(m_titleLabel, "titleLabel");
StyleHelper::BasicButton(m_continueButton, "continueButton");
StyleHelper::BasicButton(m_exitButton, "exitButton");
Style::setStyle(m_continueButton, style::properties::button::basicButton, true, true);
Style::setStyle(m_exitButton, style::properties::button::basicButton, true, true);
StyleHelper::OverlayMenu(this, "popupOverlay");
}

Expand Down
23 changes: 12 additions & 11 deletions gui/style/qss/generic/global.qss
Original file line number Diff line number Diff line change
Expand Up @@ -136,17 +136,6 @@ QTabWidget::pane {
border: 0;
}

QTabBar::tab {
background-color: transparent;
color: &content_default&;
padding: &padding_1&;
}

QTabBar::tab:selected {
background-color: &interactive_primary_pressed&;
color: &content_inverse&;
}

QTabBar::tab:hover {
background-color: &interactive_primary_hover&;
color: &content_inverse&;
Expand All @@ -159,6 +148,18 @@ QTabBar::tab QLabel {
padding-left: &padding_2&;;
}

QTabBar::tab {
min-width: 100px;
background: &background_primary&;
font-weight: bold;
}

QTabBar::tab:selected {
background: &background_primary&;
color: &interactive_primary_idle&;
border-bottom: 1px solid &interactive_primary_idle&;
}


/* fix this */
QScrollArea {
Expand Down
2 changes: 1 addition & 1 deletion gui/style/qss/properties/widget/basicComponent.qss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*[&&property&&=true] {
background-color: &background_primary&;
border: &border_width& solid &content_silent&;
border: &border_width& solid &interactive_subtle_disabled&;
border-radius: &radius_1&;
}
2 changes: 1 addition & 1 deletion gui/style/qss/properties/widget/border.qss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*[&&property&&=true] {
border: &border_width& solid &content_silent&;
border: &border_width& solid &interactive_subtle_disabled&;
border-radius: &radius_1&;
}
1 change: 0 additions & 1 deletion plugins/debugger/src/iioexplorer/detailsview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ void DetailsView::setupUi()

Style::setStyle(tabContainer, style::properties::debugger::detailsView, true, true);
Style::setStyle(m_tabWidget, style::properties::debugger::detailsView, true, true);
Style::setStyle(tabBar, style::properties::debugger::tabBar);
Style::setStyle(m_readBtn, style::properties::button::basicButton);
}

Expand Down
12 changes: 0 additions & 12 deletions plugins/debugger/style/qss/properties/debugger/tabBar.qss

This file was deleted.

6 changes: 3 additions & 3 deletions plugins/swiot/src/swiotplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,17 +444,17 @@ bool SWIOTPlugin::loadPreferencesPage()
resetTutorialMax14906WidgetLayout->addWidget(resetTutorialAd74413r, 1);
generalSection->contentLayout()->addWidget(resetTutorialAd74413rWidget);

Style::setStyle(resetTutorialAd74413r, style::properties::button::basicButton);
Style::setStyle(resetTutorialMax14906, style::properties::button::basicButton);
resetTutorialAd74413rWidgetLayout->addWidget(new QLabel("Max14906 tutorial"), 6);
resetTutorialAd74413rWidgetLayout->addWidget(resetTutorialMax14906, 1);
generalSection->contentLayout()->addWidget(resetTutorialMax14906Widget);

Style::setStyle(resetTutorialAd74413r, style::properties::button::basicButton);
Style::setStyle(resetTutorialFaults, style::properties::button::basicButton);
resetTutorialFaultsWidgetLayout->addWidget(new QLabel("Faults tutorial"), 6);
resetTutorialFaultsWidgetLayout->addWidget(resetTutorialFaults, 1);
generalSection->contentLayout()->addWidget(resetTutorialFaultsWidget);

Style::setStyle(resetTutorialAd74413r, style::properties::button::basicButton);
Style::setStyle(resetTutorialConfig, style::properties::button::basicButton);
resetTutorialConfigurationWidgetLayout->addWidget(new QLabel("Configuration tutorial"), 6);
resetTutorialConfigurationWidgetLayout->addWidget(resetTutorialConfig, 1);
generalSection->contentLayout()->addWidget(resetTutorialConfigurationWidget);
Expand Down
3 changes: 0 additions & 3 deletions plugins/test/src/styletool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ QWidget *StyleTool::buildStylePage()
addLabeledWidget("Device Line", new QFrame);
addLabeledWidget("Solid Border", new QWidget);
addLabeledWidget("Device Icon", new QWidget);
addLabeledWidget("Tree View", new QWidget);
addLabeledWidget("Not Interactive", new QWidget);
addLabeledWidget("Border", new QWidget);

Expand All @@ -110,8 +109,6 @@ QWidget *StyleTool::buildStylePage()
style::properties::widget::solidBorder, true, true);
Style::setStyle(layout->itemAt(i++)->widget()->layout()->itemAt(1)->widget(),
style::properties::widget::deviceIcon, true, true);
Style::setStyle(layout->itemAt(i++)->widget()->layout()->itemAt(1)->widget(),
style::properties::widget::treeView, true, true);
Style::setStyle(layout->itemAt(i++)->widget()->layout()->itemAt(1)->widget(),
style::properties::widget::notInteractive, true, true);
Style::setStyle(layout->itemAt(i++)->widget()->layout()->itemAt(1)->widget(), style::properties::widget::border,
Expand Down

0 comments on commit 562d9b5

Please sign in to comment.