diff --git a/cmake/Version.cmake b/cmake/Version.cmake index f59de32c9..a8b25c6cb 100644 --- a/cmake/Version.cmake +++ b/cmake/Version.cmake @@ -3,7 +3,7 @@ set(STRAWBERRY_VERSION_MINOR 1) set(STRAWBERRY_VERSION_PATCH 6) #set(STRAWBERRY_VERSION_PRERELEASE rc1) -set(INCLUDE_GIT_REVISION OFF) +set(INCLUDE_GIT_REVISION ON) set(majorminorpatch "${STRAWBERRY_VERSION_MAJOR}.${STRAWBERRY_VERSION_MINOR}.${STRAWBERRY_VERSION_PATCH}") diff --git a/data/style/mainwindow.css b/data/style/mainwindow.css index 0a6712eaf..cbc6f45f0 100644 --- a/data/style/mainwindow.css +++ b/data/style/mainwindow.css @@ -5,7 +5,7 @@ } #playlist[default_background_enabled = "true"] { - background-image: url(:/pictures/strawbs-transparent.png); + background-image: url(:pictures/strawbs-transparent.png); background-attachment: fixed; background-position: bottom right; background-repeat: none; diff --git a/src/core/mainwindow.cpp b/src/core/mainwindow.cpp index 5e5324987..f227af35c 100644 --- a/src/core/mainwindow.cpp +++ b/src/core/mainwindow.cpp @@ -219,16 +219,15 @@ MainWindow::MainWindow(Application *app, SystemTrayIcon *tray_icon, OSD *osd, co StyleHelper::setBaseColor(palette().color(QPalette::Highlight).darker()); // Add tabs to the fancy tab widget - - ui_->tabs->AddTab(status_view_, IconLoader::Load("strawberry"), tr("Status")); - ui_->tabs->AddTab(collection_view_, IconLoader::Load("vinyl"), tr("Collection")); - ui_->tabs->AddTab(file_view_, IconLoader::Load("document-open"), tr("Files")); - ui_->tabs->AddTab(playlist_list_, IconLoader::Load("view-media-playlist"), tr("Playlists")); - ui_->tabs->AddTab(device_view_, IconLoader::Load("device"), tr("Devices")); + ui_->tabs->addTab(status_view_, IconLoader::Load("strawberry"), tr("Status")); + ui_->tabs->addTab(collection_view_, IconLoader::Load("vinyl"), tr("Collection")); + ui_->tabs->addTab(file_view_, IconLoader::Load("document-open"), tr("Files")); + ui_->tabs->addTab(playlist_list_, IconLoader::Load("view-media-playlist"), tr("Playlists")); + ui_->tabs->addTab(device_view_, IconLoader::Load("device"), tr("Devices")); //ui_->tabs->AddSpacer(); // Add the now playing widget to the fancy tab widget - ui_->tabs->AddBottomWidget(ui_->now_playing); + ui_->tabs->addBottomWidget(ui_->now_playing); //ui_->tabs->SetBackgroundPixmap(QPixmap(":/pictures/strawberry-background.png")); @@ -643,7 +642,7 @@ MainWindow::MainWindow(Application *app, SystemTrayIcon *tray_icon, OSD *osd, co if (!ui_->splitter->restoreState(settings_.value("splitter_state").toByteArray())) { ui_->splitter->setSizes(QList() << 300 << width() - 300); } - ui_->tabs->SetCurrentIndex(settings_.value("current_tab", 1 /* Collection tab */ ).toInt()); + ui_->tabs->setCurrentIndex(settings_.value("current_tab", 1 /* Collection tab */ ).toInt()); FancyTabWidget::Mode default_mode = FancyTabWidget::Mode_LargeSidebar; ui_->tabs->SetMode(FancyTabWidget::Mode(settings_.value("tab_mode", default_mode).toInt())); file_view_->SetPath(settings_.value("file_path", QDir::homePath()).toString()); @@ -842,7 +841,7 @@ void MainWindow::resizeEvent(QResizeEvent*) { SaveGeometry(); } void MainWindow::TabSwitched() { - if (ui_->tabs->current_index() > 0) + if (ui_->tabs->currentIndex() > 0) ui_->now_playing->SetEnabled(); else ui_->now_playing->SetDisabled(); @@ -860,7 +859,7 @@ void MainWindow::SaveGeometry() { settings_.setValue("geometry", saveGeometry()); } settings_.setValue("splitter_state", ui_->splitter->saveState()); - settings_.setValue("current_tab", ui_->tabs->current_index()); + settings_.setValue("current_tab", ui_->tabs->currentIndex()); settings_.setValue("tab_mode", ui_->tabs->mode()); } @@ -2229,7 +2228,7 @@ void MainWindow::HandleNotificationPreview(OSD::Behaviour type, QString line1, Q } void MainWindow::FocusCollectionTab() { - ui_->tabs->SetCurrentWidget(collection_view_); + ui_->tabs->setCurrentWidget(collection_view_); } void MainWindow::ShowConsole() { diff --git a/src/widgets/fancytabwidget.cpp b/src/widgets/fancytabwidget.cpp index 842586a5d..7452512f9 100644 --- a/src/widgets/fancytabwidget.cpp +++ b/src/widgets/fancytabwidget.cpp @@ -401,6 +401,7 @@ void FancyTabBar::mousePressEvent(QMouseEvent *e) } void FancyTabBar::addTab(const QIcon& icon, const QString& label) { + FancyTab *tab = new FancyTab(this); tab->icon = icon; tab->text = label; @@ -551,7 +552,7 @@ FancyTabWidget::FancyTabWidget(QWidget* parent) setLayout(main_layout); } -void FancyTabWidget::AddTab(QWidget* tab, const QIcon& icon, const QString& label) { +void FancyTabWidget::addTab(QWidget* tab, const QIcon& icon, const QString& label) { stack_->addWidget(tab); items_ << Item(icon, label); } @@ -594,11 +595,11 @@ void FancyTabWidget::paintEvent(QPaintEvent*) { painter.drawLine(rect.bottomLeft(), rect.bottomRight()); } -int FancyTabWidget::current_index() const { +int FancyTabWidget::currentIndex() const { return stack_->currentIndex(); } -void FancyTabWidget::SetCurrentIndex(int index) { +void FancyTabWidget::setCurrentIndex(int index) { if (FancyTabBar* bar = qobject_cast(tab_bar_)) { bar->setCurrentIndex(index); } else if (QTabBar* bar = qobject_cast(tab_bar_)) { @@ -608,8 +609,8 @@ void FancyTabWidget::SetCurrentIndex(int index) { } } -void FancyTabWidget::SetCurrentWidget(QWidget* widget) { - SetCurrentIndex(stack_->indexOf(widget)); +void FancyTabWidget::setCurrentWidget(QWidget* widget) { + setCurrentIndex(stack_->indexOf(widget)); } void FancyTabWidget::ShowWidget(int index) { @@ -617,7 +618,7 @@ void FancyTabWidget::ShowWidget(int index) { emit CurrentChanged(index); } -void FancyTabWidget::AddBottomWidget(QWidget* widget) { +void FancyTabWidget::addBottomWidget(QWidget* widget) { top_layout_->addWidget(widget); } diff --git a/src/widgets/fancytabwidget.h b/src/widgets/fancytabwidget.h index 44c456c4e..bcd9dc0e6 100644 --- a/src/widgets/fancytabwidget.h +++ b/src/widgets/fancytabwidget.h @@ -191,18 +191,18 @@ class FancyTabWidget : public QWidget { int spacer_size_; }; - void AddTab(QWidget *tab, const QIcon &icon, const QString &label); + void addTab(QWidget *tab, const QIcon &icon, const QString &label); void AddSpacer(int size = 40); void SetBackgroundPixmap(const QPixmap &pixmap); - void AddBottomWidget(QWidget *widget); + void addBottomWidget(QWidget *widget); - int current_index() const; + int currentIndex() const; Mode mode() const { return mode_; } public slots: - void SetCurrentIndex(int index); - void SetCurrentWidget(QWidget *widget); + void setCurrentIndex(int index); + void setCurrentWidget(QWidget *widget); void SetMode(Mode mode); void SetMode(int mode) { SetMode(Mode(mode)); } diff --git a/src/widgets/statusview.cpp b/src/widgets/statusview.cpp index c5ad7d461..d72178800 100644 --- a/src/widgets/statusview.cpp +++ b/src/widgets/statusview.cpp @@ -150,7 +150,7 @@ void StatusView::CreateWidget() { //qLog(Debug) << __PRETTY_FUNCTION__; setLayout(layout_); - setStyleSheet("background-color: white;"); + //setStyleSheet("background-color: white;"); layout_->setSizeConstraint(QLayout::SetMinAndMaxSize); layout_->setContentsMargins(0, 0, 0, 0);