[PC-BSD Commits] r21564 - pcbsd-projects/PCDM
svn at pcbsd.org
svn at pcbsd.org
Fri Feb 15 17:01:41 PST 2013
Author: kenmoore
Date: 2013-02-16 01:01:41 +0000 (Sat, 16 Feb 2013)
New Revision: 21564
Modified:
pcbsd-projects/PCDM/loginWidget.cpp
pcbsd-projects/PCDM/loginWidget.h
pcbsd-projects/PCDM/pcdm-gui.cpp
Log:
Cleanup the PCDM startup procedure a bit more, and fix setting the keyboard focus initially.
Modified: pcbsd-projects/PCDM/loginWidget.cpp
===================================================================
--- pcbsd-projects/PCDM/loginWidget.cpp 2013-02-16 00:43:15 UTC (rev 21563)
+++ pcbsd-projects/PCDM/loginWidget.cpp 2013-02-16 01:01:41 UTC (rev 21564)
@@ -239,3 +239,8 @@
this->setTitle( QString(tr("Login to %1")).arg(hostName) );
}
}
+
+void LoginWidget::resetFocus(){
+ //Set the Keyboard focus on the list of users
+ listUsers->setFocus();
+}
Modified: pcbsd-projects/PCDM/loginWidget.h
===================================================================
--- pcbsd-projects/PCDM/loginWidget.h 2013-02-16 00:43:15 UTC (rev 21563)
+++ pcbsd-projects/PCDM/loginWidget.h 2013-02-16 01:01:41 UTC (rev 21564)
@@ -41,6 +41,7 @@
void keyPressEvent(QKeyEvent *e);
void setBackgroundFade(bool verticalFade, int percentfade, QString colorTL, QString colorBR);
void retranslateUi();
+ void resetFocus();
private:
QComboBox* listUsers;
Modified: pcbsd-projects/PCDM/pcdm-gui.cpp
===================================================================
--- pcbsd-projects/PCDM/pcdm-gui.cpp 2013-02-16 00:43:15 UTC (rev 21563)
+++ pcbsd-projects/PCDM/pcdm-gui.cpp 2013-02-16 01:01:41 UTC (rev 21564)
@@ -185,22 +185,9 @@
QSize deSize = currentTheme->itemIconSize("desktop");
deSwitcher->setIconSize(deSize.height());
//Figure out if we need to smooth out the animation
- //QString deStyle = currentTheme::objectStyleSheet("desktop");
- //deSwitcher->setStyleSheet(deStyle);
- //if(deStyle.contains("background: transparent;")){
- deSwitcher->setNumberAnimationFrames("2"); // transparent widget background slows the animation to a crawl with a stretched background image
- //}else{
- //deSwitcher->setNumberAnimationFrames("smooth");
- //}
- //Add the available desktops to the switcher
- QStringList deList = Backend::getAvailableDesktops();
- for(int i=0; i<deList.length(); i++){
- QString deIcon = Backend::getDesktopIcon(deList[i]);
- if( deIcon.isEmpty() ){ deIcon = currentTheme->itemIcon("desktop"); } //set the default icon if none given
- deSwitcher->addItem( deList[i], deIcon, Backend::getDesktopComment(deList[i]) );
- }
- //Set the switcher to the last used desktop environment
- //deSwitcher->setCurrentItem("kde3");
+ deSwitcher->setNumberAnimationFrames("4");
+ //NOTE: A transparent widget background slows the full animation to a crawl with a stretched background image
+
grid->addWidget( deSwitcher, currentTheme->itemLocation("desktop","row"), \
currentTheme->itemLocation("desktop","col"), \
currentTheme->itemLocation("desktop","rowspan"), \
@@ -232,7 +219,7 @@
retranslateUi();
qDebug() << "GUI Time: Translation Finished:" << QString::number(timer->elapsed()) + " ms";
//Now make sure that the login widget has focus
- //loginW->setFocus();
+ loginW->resetFocus();
}
@@ -405,7 +392,9 @@
deSwitcher->removeAllItems();
QStringList deList = Backend::getAvailableDesktops();
for(int i=0; i<deList.length(); i++){
- deSwitcher->addItem( deList[i], Backend::getDesktopIcon(deList[i]), Backend::getDesktopComment(deList[i]) );
+ QString deIcon = Backend::getDesktopIcon(deList[i]);
+ if( deIcon.isEmpty() ){ deIcon = currentTheme->itemIcon("desktop"); } //set the default icon if none given
+ deSwitcher->addItem( deList[i], deIcon, Backend::getDesktopComment(deList[i]) );
}
//Set the switcher to the last used desktop environment
//deSwitcher->setCurrentItem("kde3");
More information about the Commits
mailing list