From 7bdf4e22259bdd135df29f59aaf5fecb44037b48 Mon Sep 17 00:00:00 2001 From: q5sys Date: Thu, 3 Aug 2017 09:05:28 -0400 Subject: get basic user defined sound enabled --- src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src-qt5/core/lumina-desktop/panel-plugins') diff --git a/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp b/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp index 5e9d7a7f..be5b8488 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp @@ -78,8 +78,10 @@ void LBattery::updateBattery(bool force){ } if(iconplayAudioFile(LOS::LuminaShare()+"low-battery.ogg"); - } + QString sfile = LSession::handle()->sessionSettings()->value("audiofiles/batterylow", LOS::LuminaShare()+"low-battery.ogg").toString(); + LSession::handle()->playAudioFile(sfile); + } + if(icon==0){ label->setStyleSheet("QLabel{ background: red;}"); } else if(icon==14 && charge>98){ label->setStyleSheet("QLabel{ background: green;}"); } else{ label->setStyleSheet("QLabel{ background: transparent;}"); } -- cgit From 560a35578032174163cdf99bdd7ea5b7a1da137a Mon Sep 17 00:00:00 2001 From: q5sys Date: Fri, 4 Aug 2017 13:12:46 -0400 Subject: fix for clock minimum width --- src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src-qt5/core/lumina-desktop/panel-plugins') diff --git a/src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp b/src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp index bdf9b27e..db661841 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp @@ -102,7 +102,7 @@ void LClock::updateTime(bool adjustformat){ lwid = metrics.width(lines[i]); if(lwid>wid){ wid = lwid; } } - this->setMinimumWidth( wid - (4*metrics.width("O")) ); + this->setMinimumWidth(wid); this->setMaximumWidth(wid + (4*metrics.width("O"))); }else{ //vertical layout -- cgit From 2095ffee98a4376e16036f395d173ba674570626 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 14 Aug 2017 16:47:22 -0400 Subject: Fix the clock width detection/setting. Had a typo in the delimiter.... --- .../core/lumina-desktop/panel-plugins/clock/LClock.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src-qt5/core/lumina-desktop/panel-plugins') diff --git a/src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp b/src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp index db661841..2972ea86 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp @@ -25,14 +25,14 @@ LClock::LClock(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, calAct->setDefaultWidget(calendar); TZMenu = new QMenu(this); connect(TZMenu, SIGNAL(triggered(QAction*)), this, SLOT(ChangeTZ(QAction*)) ); - + //Now assemble the menu button->menu()->addAction(calAct); button->menu()->addMenu(TZMenu); - + this->layout()->setContentsMargins(0,0,0,0); //reserve some space on left/right this->layout()->addWidget(button); - + //Setup the timer timer = new QTimer(); //Load all the initial settings @@ -71,10 +71,11 @@ void LClock::updateTime(bool adjustformat){ }else if(datetimeorder == "datetime"){ label = datelabel + "\n" + timelabel; button->setToolTip(""); - }else{ + }else{ label = timelabel; button->setToolTip(datelabel); } + QStringList lines = label.split("\n"); if( this->layout()->direction() == QBoxLayout::TopToBottom ){ //different routine for vertical text (need newlines instead of spaces) for(int i=0; isize().height() < 2*this->fontMetrics().height() ){ + }else if( this->size().height() < lines.length()*this->fontMetrics().height() ){ label.replace("\n",", "); } if(adjustformat){ @@ -92,16 +93,17 @@ void LClock::updateTime(bool adjustformat){ font.setBold(true); button->setFont(font); //Check the font/spacing for the display and adjust as necessary - QStringList lines = label.split("/n"); + QStringList lines = label.split("\n"); QFontMetrics metrics(font); if(this->layout()->direction()==QBoxLayout::LeftToRight){ //horizontal layout int wid = 0; - int lwid; + int lwid = 0; for(int i=0; iwid){ wid = lwid; } } + qDebug() << "Verify Clock width:" << lines.length() << wid << lines; this->setMinimumWidth(wid); this->setMaximumWidth(wid + (4*metrics.width("O"))); }else{ -- cgit From 9fe4993bdc8a166c60c1191292aa353d1937f109 Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Tue, 15 Aug 2017 16:28:16 -0400 Subject: Added translations to menu buttons and the panel settings dialogue --- .../core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src-qt5/core/lumina-desktop/panel-plugins') 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 6557dbee..1992db0f 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp @@ -1,8 +1,6 @@ //=========================================== // Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details +// Copyright (c) 2015, Ken Moore // Available under the 3-clause BSD license // See the LICENSE file for full details //=========================================== #include "StartMenu.h" #include "ui_StartMenu.h" @@ -290,6 +288,9 @@ bool StartMenu::promptAboutUpdates(bool &skip){ if(pending.isEmpty()){ skip = false; } //continue without skip else{ QMessageBox dlg(QMessageBox::Question, tr("Apply Updates?"), tr("You have system updates waiting to be applied! Do you wish to install them now?"), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, this); + dlg.setButtonText(QMessageBox::Yes, tr("Yes")); + dlg.setButtonText(QMessageBox::No, tr("No")); + dlg.setButtonText(QMessageBox::Cancel, tr("Cancel")); dlg.setDetailedText(pending); dlg.setDefaultButton(QMessageBox::Yes); dlg.show(); -- cgit