From 8934798739a943f9336c0ee6a23d71d907c06e76 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 31 Jan 2020 13:26:39 -0500 Subject: Fix the desktop/plugin screen detection (raw geom, not available). Also fix a couple icons (add new options to look for) --- src-qt5/core-utils/lumina-config/LPlugins.cpp | 26 +++++++++++----------- src-qt5/core/lumina-desktop/LDesktop.cpp | 2 +- src-qt5/core/lumina-desktop/LSession.cpp | 2 +- .../systemdashboard/LSysDashboard.cpp | 4 +--- .../panel-plugins/systemdashboard/SysMenuQuick.cpp | 14 ++++++------ .../panel-plugins/systemstart/StartMenu.cpp | 2 +- 6 files changed, 24 insertions(+), 26 deletions(-) diff --git a/src-qt5/core-utils/lumina-config/LPlugins.cpp b/src-qt5/core-utils/lumina-config/LPlugins.cpp index f3b96003..9404b7e6 100644 --- a/src-qt5/core-utils/lumina-config/LPlugins.cpp +++ b/src-qt5/core-utils/lumina-config/LPlugins.cpp @@ -52,7 +52,7 @@ LPI LPlugins::menuPluginInfo(QString plug){ } LPI LPlugins::colorInfo(QString item){ if(COLORS.contains(item)){ return COLORS[item]; } - else{ return LPI(); } + else{ return LPI(); } } //=================== @@ -74,14 +74,14 @@ void LPlugins::LoadPanelPlugins(){ info.description = QObject::tr("Start menu alternative which focuses on launching applications."); info.ID = "appmenu"; info.icon = "format-list-unordered"; - PANEL.insert(info.ID, info); + PANEL.insert(info.ID, info); //Desktop Bar info = LPI(); //clear it info.name = QObject::tr("Desktop Bar"); info.description = QObject::tr("This provides shortcuts to everything in the desktop folder - allowing easy access to all your favorite files/applications."); info.ID = "desktopbar"; info.icon = "user-desktop"; - PANEL.insert(info.ID, info); + PANEL.insert(info.ID, info); //Spacer info = LPI(); //clear it info.name = QObject::tr("Spacer"); @@ -95,56 +95,56 @@ void LPlugins::LoadPanelPlugins(){ info.description = QObject::tr("Simple line to provide visual separation between items."); info.ID = "line"; info.icon = "insert-horizontal-rule"; - PANEL.insert(info.ID, info); + PANEL.insert(info.ID, info); //Desktop Switcher info = LPI(); //clear it info.name = QObject::tr("Workspace Switcher"); info.description = QObject::tr("Controls for switching between the various virtual desktops."); info.ID = "desktopswitcher"; info.icon = "format-view-carousel"; - PANEL.insert(info.ID, info); + PANEL.insert(info.ID, info); //Battery info = LPI(); //clear it info.name = QObject::tr("Battery Monitor"); info.description = QObject::tr("Keep track of your battery status."); info.ID = "battery"; info.icon = "battery-charging"; - PANEL.insert(info.ID, info); + PANEL.insert(info.ID, info); //Clock info = LPI(); //clear it info.name = QObject::tr("Time/Date"); info.description = QObject::tr("View the current time and date."); info.ID = "clock"; info.icon = "preferences-system-time"; - PANEL.insert(info.ID, info); + PANEL.insert(info.ID, info); //System Dachboard plugin info = LPI(); //clear it info.name = QObject::tr("System Dashboard"); info.description = QObject::tr("View or change system settings (audio volume, screen brightness, battery life, virtual desktops)."); info.ID = "systemdashboard"; info.icon = "arrow-down-drop-circle"; - PANEL.insert(info.ID, info); + PANEL.insert(info.ID, info); //Task Manager info = LPI(); //clear it info.name = QObject::tr("Task Manager"); info.description = QObject::tr("View and control any running application windows (group similar windows under a single button)."); info.ID = "taskmanager"; info.icon = "preferences-system-windows"; - PANEL.insert(info.ID, info); + PANEL.insert(info.ID, info); //Task Manager info = LPI(); //clear it info.name = QObject::tr("Task Manager (No Groups)"); info.description = QObject::tr("View and control any running application windows (every individual window has a button)"); info.ID = "taskmanager-nogroups"; info.icon = "preferences-system-windows"; - PANEL.insert(info.ID, info); + PANEL.insert(info.ID, info); //System Tray info = LPI(); //clear it info.name = QObject::tr("System Tray"); info.description = QObject::tr("Display area for dockable system applications"); info.ID = "systemtray"; info.icon = "preferences-system-windows-actions"; - PANEL.insert(info.ID, info); + PANEL.insert(info.ID, info); //Home Button info = LPI(); //clear it info.name = QObject::tr("Show Desktop"); @@ -158,14 +158,14 @@ void LPlugins::LoadPanelPlugins(){ info.description = QObject::tr("Unified system access and application launch menu."); info.ID = "systemstart"; info.icon = "Lumina-DE"; - PANEL.insert(info.ID, info); + PANEL.insert(info.ID, info); //Application Launcher info = LPI(); //clear it info.name = QObject::tr("Application Launcher"); info.description = QObject::tr("Pin an application shortcut directly to the panel"); info.ID = "applauncher"; info.icon = "quickopen"; - PANEL.insert(info.ID, info); + PANEL.insert(info.ID, info); //Audio Player Plugin info = LPI(); //clear it info.name = QObject::tr("Audio Player"); diff --git a/src-qt5/core/lumina-desktop/LDesktop.cpp b/src-qt5/core/lumina-desktop/LDesktop.cpp index d4650433..6ca48a28 100644 --- a/src-qt5/core/lumina-desktop/LDesktop.cpp +++ b/src-qt5/core/lumina-desktop/LDesktop.cpp @@ -519,7 +519,7 @@ void LDesktop::UpdateDesktopPluginArea(){ if(rec.size().isNull() ){ return; } //|| rec == bgDesktop->geometry()){return; } //nothing changed //bgDesktop->show(); //make sure Fluxbox is aware of it *before* we start moving it - bgDesktop->setGeometry( QGuiApplication::screens().at(Screen())->availableGeometry()); + bgDesktop->setGeometry( QGuiApplication::screens().at(Screen())->geometry()); //bgDesktop->resize(LSession::desktop()->screenGeometry(Screen()).size()); //bgDesktop->move(LSession::desktop()->screenGeometry(Screen()).topLeft()); bgDesktop->setDesktopArea( rec ); diff --git a/src-qt5/core/lumina-desktop/LSession.cpp b/src-qt5/core/lumina-desktop/LSession.cpp index 2495e336..2841d94c 100644 --- a/src-qt5/core/lumina-desktop/LSession.cpp +++ b/src-qt5/core/lumina-desktop/LSession.cpp @@ -699,7 +699,7 @@ QFileInfoList LSession::DesktopFiles(){ QRect LSession::screenGeom(int num){ QList screens = QGuiApplication::screens(); if(num < 0 || num >= screens.count() ){ return QRect(); } - QRect geom = screens.at(num)->availableGeometry(); + QRect geom = screens.at(num)->geometry(); return geom; } diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemdashboard/LSysDashboard.cpp b/src-qt5/core/lumina-desktop/panel-plugins/systemdashboard/LSysDashboard.cpp index b9d70e97..f8059d08 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemdashboard/LSysDashboard.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemdashboard/LSysDashboard.cpp @@ -24,7 +24,6 @@ LSysDashboard::LSysDashboard(QWidget *parent, QString id, bool horizontal) : LPP mact = new QWidgetAction(this); mact->setDefaultWidget(sysmenu); menu->addAction(mact); - button->setMenu(menu); QTimer::singleShot(0,this, SLOT(OrientationChange())); //Update icons/sizes } @@ -77,7 +76,7 @@ void LSysDashboard::updateIcon(bool force){ } void LSysDashboard::resetIcon(){ - button->setIcon( LXDG::findIcon("arrow-down-drop-circle","")); + button->setIcon( LXDG::findIcon("onboard-panel","arrow-down-drop-circle")); } void LSysDashboard::openMenu(){ @@ -88,4 +87,3 @@ void LSysDashboard::openMenu(){ void LSysDashboard::closeMenu(){ menu->hide(); } - diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp b/src-qt5/core/lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp index e6602dd6..15f57e77 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp @@ -29,20 +29,20 @@ LSysMenuQuick::LSysMenuQuick(QWidget *parent) : QWidget(parent), ui(new Ui::LSys connect(brighttimer, SIGNAL(timeout()), this, SLOT(setCurrentBrightness()) ); connect(ui->combo_locale, SIGNAL(currentIndexChanged(int)), this, SLOT(changeLocale()) ); //And setup the default icons - ui->label_bright_icon->setPixmap( LXDG::findIcon("preferences-desktop-brightness","").pixmap(ui->label_bright_icon->maximumSize()) ); + ui->label_bright_icon->setPixmap( LXDG::findIcon("brightnesssettings","preferences-desktop-brightness").pixmap(ui->label_bright_icon->maximumSize()) ); ui->tool_wk_prev->setIcon( LXDG::findIcon("go-previous-view","")); ui->tool_wk_next->setIcon( LXDG::findIcon("go-next-view","") ); ui->tool_logout->setIcon( LXDG::findIcon("system-log-out","") ); } LSysMenuQuick::~LSysMenuQuick(){ - + } void LSysMenuQuick::UpdateMenu(){ ui->retranslateUi(this); //Audio Volume - int val = LOS::audioVolume(); + int val = LOS::audioVolume(); QIcon ico; if(val > 66){ ico= LXDG::findIcon("audio-volume-high",""); } else if(val > 33){ ico= LXDG::findIcon("audio-volume-medium",""); } @@ -69,7 +69,7 @@ void LSysMenuQuick::UpdateMenu(){ ui->label_bright_text->setText(txt); if(ui->slider_brightness->value()!=val){ ui->slider_brightness->setValue(val); } } - + //Do any one-time checks if(firstrun){ hasBat = LOS::hasBattery(); //No need to check this more than once - will not change in the middle of a session @@ -87,7 +87,7 @@ void LSysMenuQuick::UpdateMenu(){ } ui->group_locale->setVisible(locales.length() > 1); } - + //Battery Status if(hasBat){ ui->group_battery->setVisible(true); @@ -141,7 +141,7 @@ void LSysMenuQuick::brightSliderChanged(){ //Brightness controls cannot operate extremely quickly - combine calls as necessary if(brighttimer->isActive()){ brighttimer->stop(); } brighttimer->start(); - //*DO* update the label right away + // *DO* update the label right away int val = ui->slider_brightness->value(); QString txt = QString::number(val)+"%"; if(val<100){ txt.prepend(" "); } //make sure no widget resizing @@ -153,7 +153,7 @@ void LSysMenuQuick::setCurrentBrightness(){ LOS::setScreenBrightness(val); QString txt = QString::number(val)+"%"; if(val<100){ txt.prepend(" "); } //make sure no widget resizing - ui->label_bright_text->setText( txt ); + ui->label_bright_text->setText( txt ); } void LSysMenuQuick::nextWorkspace(){ diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp index bcb15784..f39d85d5 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp @@ -55,7 +55,7 @@ void StartMenu::UpdateAll(){ ui->tool_launch_deskinfo->setIcon(LXDG::findIcon("system-help","")); ui->tool_launch_mixer->setIcon( LXDG::findIcon("preferences-desktop-sound","") ); - ui->label_bright_icon->setPixmap( LXDG::findIcon("preferences-desktop-brightness","").pixmap(ui->tool_goto_apps->iconSize()) ); + ui->label_bright_icon->setPixmap( LXDG::findIcon("brightnesssettings","preferences-desktop-brightness").pixmap(ui->tool_goto_apps->iconSize()) ); ui->label_locale_icon->setPixmap( LXDG::findIcon("preferences-desktop-locale","").pixmap(ui->tool_goto_apps->iconSize()) ); ui->tool_set_nextwkspace->setIcon(LXDG::findIcon("go-next-view","")); ui->tool_set_prevwkspace->setIcon(LXDG::findIcon("go-previous-view","")); -- cgit