Skip to content

Commit

Permalink
V2022.8.1
Browse files Browse the repository at this point in the history
- Introduced ribbon interface for commands
- Fixed an issue where the application would not exit correctly when updating
  • Loading branch information
nlogozzo committed Aug 13, 2022
1 parent 3a547da commit e3aa84b
Show file tree
Hide file tree
Showing 12 changed files with 309 additions and 246 deletions.
2 changes: 1 addition & 1 deletion Installer.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "Nickvision Tube Converter"
#define MyAppVersion "2022.8.0"
#define MyAppVersion "2022.8.1"
#define MyAppPublisher "Nickvision"
#define MyAppURL "http://nickvision.org/"
#define MyAppExeName "NickvisionTubeConverter.exe"
Expand Down
12 changes: 12 additions & 0 deletions NickvisionTubeConverter/Helpers/ThemeHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,18 @@ namespace NickvisionTubeConverter::Helpers
}
}

QString ThemeHelpers::getThemedRibbonStyle()
{
if (Configuration::getInstance().getTheme() == Theme::Light)
{
return "QTabWidget::pane { background: transparent; border: 1px solid #c4c2c2; }";
}
else
{
return "QTabWidget::pane { background: transparent; border: 1px solid #2b2b2b; }";
}
}

void ThemeHelpers::applyWin32Theme(QWidget* widget)
{
BOOL isDarkMode{ Configuration::getInstance().getTheme() == Theme::Light ? FALSE : TRUE };
Expand Down
5 changes: 5 additions & 0 deletions NickvisionTubeConverter/Helpers/ThemeHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ namespace NickvisionTubeConverter::Helpers::ThemeHelpers
/// <returns>Separator stylesheet themed for Configuration::getTheme()</returns>
QString getThemedSeparatorStyle();
/// <summary>
/// Gets a themed stylesheet for a ribbon (QTabWidget)
/// </summary>
/// <returns>Ribbon stylesheet themed for Configuration::getTheme()</returns>
QString getThemedRibbonStyle();
/// <summary>
/// Applys Win32 theming to QWidget's Title Bar
/// </summary>
/// <param name="widget">The QWidget object</param>
Expand Down
5 changes: 4 additions & 1 deletion NickvisionTubeConverter/UI/Views/BrowsePage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ namespace NickvisionTubeConverter::UI::Views
}
//Setup UI
m_ui.setupUi(this);
//Ribbon
m_ui.ribbon->setCurrentIndex(0);
//Download Button
m_ui.btnDownload->setVisible(false);
//==Theme==//
Expand All @@ -30,7 +32,7 @@ namespace NickvisionTubeConverter::UI::Views

void BrowsePage::refreshTheme()
{
m_ui.separator1->setStyleSheet(ThemeHelpers::getThemedSeparatorStyle());
m_ui.ribbon->setStyleSheet(ThemeHelpers::getThemedRibbonStyle());
}

void BrowsePage::showEvent(QShowEvent* event)
Expand Down Expand Up @@ -82,5 +84,6 @@ namespace NickvisionTubeConverter::UI::Views
{
m_ui.txtUrl->setText(url.toString());
m_ui.btnDownload->setVisible(url.toString().startsWith("https://www.youtube.com/watch?v="));
m_ui.ribbon->setCurrentIndex(url.toString().startsWith("https://www.youtube.com/watch?v=") ? 1 : 0);
}
}
Loading

0 comments on commit e3aa84b

Please sign in to comment.