Skip to content

Commit

Permalink
namespace, version
Browse files Browse the repository at this point in the history
  • Loading branch information
aliakseis committed Mar 17, 2022
1 parent 18c4bf8 commit 44d9525
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ set(CMAKE_MODULE_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/cmake"
)

project(${PROJECT_NAME} VERSION 0.1.1.17)
project(${PROJECT_NAME} VERSION 0.1.1.18)
message("Building ${PROJECT_NAME} version ${PROJECT_VERSION}")

###################################################
Expand Down
2 changes: 1 addition & 1 deletion src/common/ui_utils/getstyleoptionprogressbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <QApplication>

QStyleOptionProgressBar getStyleOptionProgressBar()
QStyleOptionProgressBar ui_utils::getStyleOptionProgressBar()
{
QStyleOptionProgressBar progressBarOption;
progressBarOption.state = QStyle::State_Enabled;
Expand Down
5 changes: 5 additions & 0 deletions src/common/ui_utils/getstyleoptionprogressbar.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@

#include <QStyleOptionProgressBar>

namespace ui_utils
{

QStyleOptionProgressBar getStyleOptionProgressBar();

}
2 changes: 1 addition & 1 deletion src/common/ui_utils/set_dark_theme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <QPalette>
#include <QStyle>

void setDarkTheme(bool enable)
void ui_utils::setDarkTheme(bool enable)
{
if (enable)
{
Expand Down
5 changes: 5 additions & 0 deletions src/common/ui_utils/set_dark_theme.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#pragma once

namespace ui_utils
{

void setDarkTheme(bool enable);

}
2 changes: 1 addition & 1 deletion src/gui/downloadcollectiondelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void DownloadCollectionDelegate::paint(QPainter* painter, const QStyleOptionView
{
// Set up a QStyleOptionProgressBar to precisely mimic the
// environment of a progress bar.
auto progressBarOption = getStyleOptionProgressBar();
auto progressBarOption = ui_utils::getStyleOptionProgressBar();
progressBarOption.state = option.state;
#ifdef Q_OS_WIN
progressBarOption.rect = option.rect.adjusted(2, 6, -2, -7);
Expand Down
2 changes: 1 addition & 1 deletion src/gui/preferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ void Preferences::apply()
if (enableDarkMode != settings.value(EnableDarkMode, EnableDarkMode_Default).toBool())
{
settings.setValue(EnableDarkMode, enableDarkMode);
setDarkTheme(enableDarkMode);
ui_utils::setDarkTheme(enableDarkMode);
}

int torrent_port = ui->torrentPortSettingEdit->text().toInt();
Expand Down
2 changes: 1 addition & 1 deletion src/gui/proplistdelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void PropListDelegate::paint(QPainter* painter, const QStyleOptionViewItem& opti
initStyleOption(&opt, index);
QApplication::style()->drawPrimitive(QStyle::PE_PanelItemViewItem, &opt, painter, opt.widget);

auto progressBarOption = getStyleOptionProgressBar();
auto progressBarOption = ui_utils::getStyleOptionProgressBar();

progressBarOption.rect = option.rect.adjusted(2, 6, -2, -7);

Expand Down
2 changes: 1 addition & 1 deletion src/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ int main(int argc, char* argv[])
Application::setStyle(new LIIIStyle);
if (QSettings().value(app_settings::EnableDarkMode, app_settings::EnableDarkMode_Default).toBool())
{
setDarkTheme(true);
ui_utils::setDarkTheme(true);
}
app.retranslateApp(QSettings().value(app_settings::ln, app_settings::ln_Default).toString());

Expand Down

0 comments on commit 44d9525

Please sign in to comment.