From 6daa479e7201325c3d18221408ce54a84d568703 Mon Sep 17 00:00:00 2001 From: Flavio Tordini Date: Mon, 3 Aug 2015 14:29:23 +0200 Subject: [PATCH] Region action in status bar --- src/standardfeedsview.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/standardfeedsview.cpp b/src/standardfeedsview.cpp index 7f62c32..94a5314 100644 --- a/src/standardfeedsview.cpp +++ b/src/standardfeedsview.cpp @@ -73,9 +73,9 @@ void StandardFeedsView::load() { addVideoSourceWidget(feed); YTRegion region = YTRegions::currentRegion(); - QToolButton *regionButton = MainWindow::instance()->getRegionButton(); - regionButton->setText(region.name); - regionButton->setIcon(YTRegions::iconForRegionId(region.id)); + QAction *regionAction = MainWindow::instance()->getRegionAction(); + regionAction->setText(region.name); + regionAction->setIcon(YTRegions::iconForRegionId(region.id)); } void StandardFeedsView::layoutCategories(const QList &categories) { @@ -131,12 +131,12 @@ void StandardFeedsView::appear() { load(); } QAction *regionAction = MainWindow::instance()->getRegionAction(); - regionAction->setVisible(true); + MainWindow::instance()->showActionInStatusBar(regionAction, true); } void StandardFeedsView::disappear() { QAction *regionAction = MainWindow::instance()->getRegionAction(); - regionAction->setVisible(false); + MainWindow::instance()->showActionInStatusBar(regionAction, false); } void StandardFeedsView::selectWorldwideRegion() { @@ -151,6 +151,5 @@ void StandardFeedsView::selectLocalRegion() { void StandardFeedsView::paintEvent(QPaintEvent *event) { QWidget::paintEvent(event); - // PainterUtils::topShadow(this); } -- 2.39.5