aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-desktop')
-rw-r--r--lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp2
-rw-r--r--lumina-desktop/panel-plugins/systemstart/StartMenu.cpp19
-rw-r--r--lumina-desktop/panel-plugins/systemstart/StartMenu.h1
-rw-r--r--lumina-desktop/panel-plugins/systemstart/StartMenu.ui65
4 files changed, 60 insertions, 27 deletions
diff --git a/lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp b/lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp
index 534b1b41..1d699ea9 100644
--- a/lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp
+++ b/lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp
@@ -78,7 +78,7 @@ void LSysMenuQuick::UpdateMenu(){
ui->combo_locale->clear();
QLocale curr;
for(int i=0; i<locales.length(); i++){
- QLocale loc(locales[i]);
+ QLocale loc( (locales[i]=="pt") ? "pt_PT" : locales[i] );
ui->combo_locale->addItem(loc.nativeLanguageName()+" ("+locales[i]+")", locales[i]); //Make the display text prettier later
if(locales[i] == curr.name() || locales[i] == curr.name().section("_",0,0) ){
//Current Locale
diff --git a/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp b/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp
index c817b1a3..2c5565df 100644
--- a/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp
+++ b/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp
@@ -51,6 +51,7 @@ void StartMenu::UpdateAll(){
ui->tool_back->setIcon(LXDG::findIcon("go-previous",""));
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-system-power-management","").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",""));
@@ -103,7 +104,7 @@ void StartMenu::UpdateAll(){
qDebug() << "Update Locales:" << locales;
qDebug() << "Current Locale:" << curr;
for(int i=0; i<locales.length(); i++){
- QLocale loc(locales[i]);
+ QLocale loc( (locales[i]=="pt") ? "pt_PT" : locales[i] );
ui->combo_locale->addItem(loc.nativeLanguageName() +" ("+locales[i]+")", locales[i]); //Make the display text prettier later
if(locales[i] == curr || locales[i] == curr.section("_",0,0) ){
//Current Locale
@@ -504,10 +505,10 @@ void StartMenu::on_slider_volume_valueChanged(int val){
ui->label_vol->setText(QString::number(val)+"%");
LOS::setAudioVolume(val);
//Also adjust the icon for the volume
- if(val<1){ ui->tool_launch_mixer->setIcon(LXDG::findIcon("audio-volume-muted","")); }
- else if(val<33){ ui->tool_launch_mixer->setIcon(LXDG::findIcon("audio-volume-low","")); }
- else if(val<66){ ui->tool_launch_mixer->setIcon(LXDG::findIcon("audio-volume-medium","")); }
- else{ ui->tool_launch_mixer->setIcon(LXDG::findIcon("audio-volume-high","")); }
+ if(val<1){ ui->tool_mute_audio->setIcon(LXDG::findIcon("audio-volume-muted","")); }
+ else if(val<33){ ui->tool_mute_audio->setIcon(LXDG::findIcon("audio-volume-low","")); }
+ else if(val<66){ ui->tool_mute_audio->setIcon(LXDG::findIcon("audio-volume-medium","")); }
+ else{ ui->tool_mute_audio->setIcon(LXDG::findIcon("audio-volume-high","")); }
}
void StartMenu::on_tool_launch_mixer_clicked(){
@@ -517,6 +518,14 @@ void StartMenu::on_tool_launch_mixer_clicked(){
}
}
+void StartMenu::on_tool_mute_audio_clicked(){
+ static int lastvol = 50;
+ if(ui->slider_volume->value()==0){ ui->slider_volume->setValue(lastvol); }
+ else{
+ lastvol = ui->slider_volume->value();
+ ui->slider_volume->setValue(0);
+ }
+}
//Screen Brightness
void StartMenu::on_slider_bright_valueChanged(int val){
diff --git a/lumina-desktop/panel-plugins/systemstart/StartMenu.h b/lumina-desktop/panel-plugins/systemstart/StartMenu.h
index 7a85df70..23aa4c07 100644
--- a/lumina-desktop/panel-plugins/systemstart/StartMenu.h
+++ b/lumina-desktop/panel-plugins/systemstart/StartMenu.h
@@ -75,6 +75,7 @@ private slots:
//Audio Volume
void on_slider_volume_valueChanged(int);
void on_tool_launch_mixer_clicked();
+ void on_tool_mute_audio_clicked();
//Screen Brightness
void on_slider_bright_valueChanged(int);
diff --git a/lumina-desktop/panel-plugins/systemstart/StartMenu.ui b/lumina-desktop/panel-plugins/systemstart/StartMenu.ui
index 3b6be0a3..896f1c8b 100644
--- a/lumina-desktop/panel-plugins/systemstart/StartMenu.ui
+++ b/lumina-desktop/panel-plugins/systemstart/StartMenu.ui
@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
- <width>180</width>
+ <width>181</width>
<height>405</height>
</rect>
</property>
@@ -42,7 +42,7 @@
<item>
<widget class="QStackedWidget" name="stackedWidget">
<property name="currentIndex">
- <number>0</number>
+ <number>2</number>
</property>
<widget class="QWidget" name="page_main">
<layout class="QVBoxLayout" name="verticalLayout_2">
@@ -142,8 +142,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>178</width>
- <height>177</height>
+ <width>179</width>
+ <height>169</height>
</rect>
</property>
</widget>
@@ -438,8 +438,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>98</width>
- <height>28</height>
+ <width>179</width>
+ <height>280</height>
</rect>
</property>
</widget>
@@ -553,7 +553,7 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
- <widget class="QToolButton" name="tool_launch_mixer">
+ <widget class="QToolButton" name="tool_mute_audio">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
@@ -572,25 +572,48 @@
</widget>
</item>
<item>
- <widget class="QSlider" name="slider_volume">
+ <layout class="QVBoxLayout" name="verticalLayout_11">
+ <item>
+ <widget class="QSlider" name="slider_volume">
+ <property name="focusPolicy">
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <property name="maximum">
+ <number>100</number>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_vol">
+ <property name="text">
+ <string notr="true">vol%</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QToolButton" name="tool_launch_mixer">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
- <property name="maximum">
- <number>100</number>
- </property>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="label_vol">
<property name="text">
- <string notr="true">vol%</string>
+ <string notr="true"/>
</property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ <property name="iconSize">
+ <size>
+ <width>32</width>
+ <height>32</height>
+ </size>
+ </property>
+ <property name="autoRaise">
+ <bool>false</bool>
</property>
</widget>
</item>
bgstack15