[PC-BSD Commits] r17799 - pcbsd-projects/PCDM

svn at pcbsd.org svn at pcbsd.org
Tue Jul 17 12:25:25 PDT 2012


Author: kenmoore
Date: 2012-07-17 19:25:25 +0000 (Tue, 17 Jul 2012)
New Revision: 17799

Modified:
   pcbsd-projects/PCDM/pcdm-gui.cpp
   pcbsd-projects/PCDM/pcdm-gui.h
   pcbsd-projects/PCDM/pcdm-themes.cpp
   pcbsd-projects/PCDM/pcdm-themes.h
   pcbsd-projects/PCDM/sample.pcdm-theme
Log:
Finish up the Theming and UI auto-creation for PCDM. It can now read a given theme file and create the interface accordingly (just need to change the defaults to make it pretty, but that can wait for later).
The next step is to start adding all the backend and configuration stuff.



Modified: pcbsd-projects/PCDM/pcdm-gui.cpp
===================================================================
--- pcbsd-projects/PCDM/pcdm-gui.cpp	2012-07-17 15:22:13 UTC (rev 17798)
+++ pcbsd-projects/PCDM/pcdm-gui.cpp	2012-07-17 19:25:25 UTC (rev 17799)
@@ -21,12 +21,14 @@
 }
 
 void PCDMgui::createGUIfromTheme(){
+  QString style;
   //Set the background image
   if(Theme::customBackground()){
     QString bgstyle = "PCDMgui {background-image: url(BGIMAGE);}";
     bgstyle.replace("BGIMAGE",Theme::background() );
-    this->setStyleSheet(bgstyle);
+    style.append(bgstyle);
   }
+  this->setStyleSheet(style);
 
   //Create the Toolbar
   toolbar = new QToolBar();
@@ -38,6 +40,7 @@
     //Set the default style and icon sizes
     toolbar->setToolButtonStyle( Theme::toolbarStyle() );  //use the theme style
     toolbar->setIconSize( QSize(Theme::toolbarSizeWidth(),Theme::toolbarSizeHeight()) ); //use theme size
+    toolbar->setStyleSheet(Theme::objectStyleSheet("toolbar"));
     
   //Populate the Toolbar with items (starts at leftmost/topmost)
     //----Virtual Keyboard
@@ -45,16 +48,19 @@
     toolbar->addAction(virtkeyboardButton);
     connect( virtkeyboardButton, SIGNAL(triggered()), this, SLOT(slotPushVirtKeyboard()) );
     virtkeyboardButton->setToolTip(tr("Virtual Keyboard"));
+
     //----Locale Switcher
     QAction* localeButton = new QAction( QIcon(Theme::objectIconPath("locale")),tr("Locale"),this );
     toolbar->addAction(localeButton);
     connect( localeButton, SIGNAL(triggered()), this, SLOT(slotChangeLocale()) );
     localeButton->setToolTip(tr("Change locale"));
+
     //----Keyboard Layout Switcher
     QAction* keyboardButton = new QAction( QIcon(Theme::objectIconPath("keyboard")),tr("Keyboard Layout"),this );
     toolbar->addAction(keyboardButton);
     connect( keyboardButton, SIGNAL(triggered()), this, SLOT(slotChangeKeyboardLayout()) );
     keyboardButton->setToolTip(tr("Change Keyboard Layout"));
+
     //----Add a spacer
     QWidget* spacer = new QWidget();
     spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
@@ -69,6 +75,7 @@
     systemButton->setMenu(systemMenu);
     toolbar->addAction(systemButton);
     connect( systemButton, SIGNAL(triggered()), this, SLOT(slotShutdownComputer()) );
+    systemButton->setToolTip(tr("Shutdown the computer"));
 
   //Create the grid layout
   QGridLayout* grid = new QGridLayout;
@@ -77,7 +84,8 @@
     QString hLayout = Theme::objectIconStyle("header");
     QLabel* header = new QLabel; 
     if(hLayout!="disabled"){
-      header->setPixmap( QPixmap( Theme::objectIconPath("header") ) );
+      QPixmap tmp( Theme::objectIconPath("header") );
+      header->setPixmap( tmp.scaled(Theme::objectIconSize("header")) );
       grid->addWidget( header, Theme::objectLocationRow("header"), \
                       Theme::objectLocationColumn("header"), \
                       Theme::objectLocationRowSpan("header"), \
@@ -89,6 +97,7 @@
     unameline = new QComboBox;
     unameline->addItems(Backend::getSystemUsers());
     unameline->setCurrentIndex(0); //select the first username on the list
+    unameline->setStyleSheet(Theme::objectStyleSheet("user"));
     if(uLayout == "disabled"){
       //Icon Disabled - just add widget to the grid
       grid->addWidget( unameline, Theme::objectLocationRow("user"), \
@@ -117,6 +126,7 @@
     //----Password Input collection
     QString pLayout = Theme::objectIconStyle("password");
     pwline = new QLineEdit; pwline->setEchoMode(QLineEdit::Password);
+    pwline->setStyleSheet(Theme::objectStyleSheet("password"));
     if(pLayout == "disabled"){
       //Icon Disabled - just add widget to the grid
       grid->addWidget( pwline, Theme::objectLocationRow("password"), \
@@ -145,6 +155,8 @@
     //----Login Button
     QString lLayout = Theme::objectIconStyle("login");
     QPushButton* pushlogin = new QPushButton(QIcon(Theme::objectIconPath("login")),tr("Login") );
+    pushlogin->setStyleSheet(Theme::objectStyleSheet("login"));
+    connect(pushlogin,SIGNAL(clicked()),this,SLOT(slotStartLogin()));
     if(lLayout=="disabled"){ pushlogin->setIcon(QIcon("")); }  //Remove the icon
     grid->addWidget( pushlogin, Theme::objectLocationRow("login"), \
                       Theme::objectLocationColumn("login"), \
@@ -157,6 +169,7 @@
     QComboBox* deSwitcher = new QComboBox;
     deSwitcher->addItems(Backend::getAvailableDesktops());
     deSwitcher->setCurrentIndex(0); //select the first desktop on the list (for now)
+    deSwitcher->setStyleSheet(Theme::objectStyleSheet("desktop"));
     if(deLayout == "disabled"){
       //Icon Disabled - just add widget to the grid
       grid->addWidget( deSwitcher, Theme::objectLocationRow("desktop"), \
@@ -198,10 +211,13 @@
     QWidget* widget = new QWidget;
     widget->setLayout(grid);
     this->setCentralWidget(widget);
-  //Connect all the buttons to their proper slots
 
 }
 
+void PCDMgui::slotStartLogin(){
+  qDebug() << "PCDM: Login procedure is not implemented yet";
+}
+
 void PCDMgui::slotShutdownComputer(){
   qDebug() << "PCDM: Shutting down computer";
   system("shutdown -p now");

Modified: pcbsd-projects/PCDM/pcdm-gui.h
===================================================================
--- pcbsd-projects/PCDM/pcdm-gui.h	2012-07-17 15:22:13 UTC (rev 17798)
+++ pcbsd-projects/PCDM/pcdm-gui.h	2012-07-17 19:25:25 UTC (rev 17799)
@@ -31,6 +31,7 @@
     void progInit();
 
 private slots:
+    void slotStartLogin();
     void slotRestartComputer();
     void slotShutdownComputer();
     void slotClosePCDM();

Modified: pcbsd-projects/PCDM/pcdm-themes.cpp
===================================================================
--- pcbsd-projects/PCDM/pcdm-themes.cpp	2012-07-17 15:22:13 UTC (rev 17798)
+++ pcbsd-projects/PCDM/pcdm-themes.cpp	2012-07-17 19:25:25 UTC (rev 17799)
@@ -1,13 +1,14 @@
 #include "pcdm-themes.h"
 
 //Setup variables that save the current theme data
-QStringList images, imSizes, imLayout, gridLayout, tbFormat, validLayouts, needText, objStruct, spacers;
+QStringList images, imSizes, imLayout, gridLayout, tbFormat, validLayouts, needText, objStruct, spacers, objStyleSheet;
 bool fullscreenWindow;
 int wWidth, wHeight, gridWidth, gridHeight;
 
 //Create the functions to read and output the theme data
 void Theme::loadDefaults(QString vars){
   if( vars=="all" ){
+    validLayouts.clear(); needText.clear(); objStruct.clear();
     validLayouts << "above" << "below" << "left" << "right" << "disabled" << "icononly";
     needText << "user" << "password" << "login";
     objStruct << "header" << "background" << "splashscreen" << "user" << "password" << "login" << "keyboard" << "locale" << "system" << "desktop" << "virt-keyboard";
@@ -55,12 +56,27 @@
     spacers << "horizontal::0::2";	//horizontal spacer at row 2, column 2
 
   }
+  if( (vars=="all") || (vars=="stylesheet") ){
+    objStyleSheet.clear();
+    objStyleSheet << "";	// [0]=Header
+    objStyleSheet << "";	// [1]=Background
+    objStyleSheet << "";	// [2]=Splash Screen
+    objStyleSheet << "";	// [3]=User
+    objStyleSheet << "";	// [4]=Password
+    objStyleSheet << "";	// [5]=Login
+    objStyleSheet << "";	// [6]=Keyboard Layout
+    objStyleSheet << "";	// [7]=Locale
+    objStyleSheet << "";	// [8]=System
+    objStyleSheet << "";	// [9]=Desktop
+    objStyleSheet << "";	// [10]=Virtual Keyboard
+  }
   if( (vars=="all") || (vars=="toolbar") ){
     tbFormat.clear();
-    tbFormat << "top";		// [0] Location [bottom | top | left | right]
-    tbFormat << "textbeside";	// [1] Style [icononly | textonly | textbeside | textunder]
+    tbFormat << "bottom";	// [0] Location [bottom | top | left | right]
+    tbFormat << "textunder";	// [1] Style [icononly | textonly | textbeside | textunder]
     tbFormat << "32";		// [2] Width in pixels
     tbFormat << "32";		// [3] Height in pixels
+    tbFormat << "";		// [4] Toolbar stylesheet
   }
 }
 
@@ -90,9 +106,8 @@
   return wHeight;
 }
 void Theme::readThemeFile(QString themeFile){
-  qDebug() << "PCDM: Loading Theme Files is not implemented yet - using defaults";
-  return;
-  /*
+  bool firstWindowItem=TRUE;
+  QString filedir;
   QFile file(themeFile);
   if( !file.open(QIODevice::ReadOnly | QIODevice::Text)){ return; }
   QTextStream in(&file);
@@ -100,13 +115,121 @@
     QString line = in.readLine().simplified();
     if( !line.isEmpty() && !line.startsWith("#") ){ //ignore empty and comment lines
       //Remove comments at the end of lines
-      line.section("#",0,0);
+      line = line.section("#",0,0).simplified();
+      QString prop = line.section("=",0,0).simplified(); //property
+      QString val = line.section("=",1,1).simplified();  //value
       //Parse out the line into the proper variables
-      
-    }
-  }
+      if(prop=="IMAGE_DIR" && !val.isEmpty()){ 
+	if(!val.endsWith("/")){val.append("/");}
+	filedir = val; 
+      }
+      else if(prop=="HEADER_IMAGE" && !val.isEmpty()){
+	QString img;
+        if(val.startsWith("/")){ img = val; }
+	else{ img = filedir + val; }
+	if(QFile::exists(img)){ images[0] = img; }
+      }
+      else if(prop=="BACKGROUND_IMAGE" && !val.isEmpty()){
+        QString img;
+        if(val.startsWith("/")){ img = val; }
+	else{ img = filedir + val; }
+	if(QFile::exists(img)){ images[1] = img; }
+      }
+      else if(prop=="SPLASHSCREEN_IMAGE" && !val.isEmpty()){
+        QString img;
+        if(val.startsWith("/")){ img = val; }
+	else{ img = filedir + val; }
+	if(QFile::exists(img)){ images[2] = img; }
+      }
+      else if(prop=="USER_IMAGE" && !val.isEmpty()){
+        QString img;
+        if(val.startsWith("/")){ img = val; }
+	else{ img = filedir + val; }
+	if(QFile::exists(img)){ images[3] = img; }
+      }
+      else if(prop=="PASSWORD_IMAGE" && !val.isEmpty()){
+        QString img;
+        if(val.startsWith("/")){ img = val; }
+	else{ img = filedir + val; }
+	if(QFile::exists(img)){ images[4] = img; }
+      }
+      else if(prop=="LOGIN_IMAGE" && !val.isEmpty()){
+        QString img;
+        if(val.startsWith("/")){ img = val; }
+	else{ img = filedir + val; }
+	if(QFile::exists(img)){ images[5] = img; }
+      }
+      else if(prop=="KEYBOARD_IMAGE" && !val.isEmpty()){
+        QString img;
+        if(val.startsWith("/")){ img = val; }
+	else{ img = filedir + val; }
+	if(QFile::exists(img)){ images[6] = img; }
+      }
+      else if(prop=="LOCALE_IMAGE" && !val.isEmpty()){
+        QString img;
+        if(val.startsWith("/")){ img = val; }
+	else{ img = filedir + val; }
+	if(QFile::exists(img)){ images[7] = img; }
+      }
+      else if(prop=="SYSTEM_IMAGE" && !val.isEmpty()){
+        QString img;
+        if(val.startsWith("/")){ img = val; }
+	else{ img = filedir + val; }
+	if(QFile::exists(img)){ images[8] = img; }
+      }
+      else if(prop=="DESKTOP_IMAGE" && !val.isEmpty()){
+        QString img;
+        if(val.startsWith("/")){ img = val; }
+	else{ img = filedir + val; }
+	if(QFile::exists(img)){ images[9] = img; }
+      }
+      else if(prop=="VIRTUAL_KEYBOARD_IMAGE" && !val.isEmpty()){
+        QString img;
+        if(val.startsWith("/")){ img = val; }
+	else{ img = filedir + val; }
+	if(QFile::exists(img)){ images[10] = img; }
+      }
+      else if(prop=="HEADER_IMAGE_SIZE" && !val.isEmpty()){ imSizes[0] = val; }
+      else if(prop=="USER_IMAGE_SIZE" && !val.isEmpty()){ imSizes[3] = val; }
+      else if(prop=="PASSWORD_IMAGE_SIZE" && !val.isEmpty()){ imSizes[4] = val; }
+      else if(prop=="DESKTOP_IMAGE_SIZE" && !val.isEmpty()){ imSizes[9] = val; }
+      else if(prop=="WINDOW_TOOLBAR_LOCATION" && !val.isEmpty()){ tbFormat[0] = val; }
+      else if(prop=="TOOLBAR_DEFAULT_SIZE" && !val.isEmpty()){ 
+	tbFormat[2] = val.section("x",0,0).simplified();
+        tbFormat[3] = val.section("x",1,1).simplified();
+      }
+      else if(prop=="TOOLBAR_STYLE" && !val.isEmpty()){ tbFormat[1] = val; }
+      else if(prop=="WINDOW_ITEM" && !val.isEmpty()){
+	if(firstWindowItem){spacers.clear(); firstWindowItem=FALSE; }
+	QString obj = val.section("::",0,0).simplified();
+	QString type= val.section("::",1,1).simplified();
+	QString row = val.section("::",2,2).section("[",1,1).section(",",0,0);
+        QString col = val.section("::",2,2).section(",",1,1).section("]",0,0);
+	if(obj=="spacer"){
+          spacers << type+"::"+row+"::"+col;
+	}else{
+	  int index = getObjectIndex(obj);
+	  if(index!=-1){
+	    imLayout[index] = type;
+	    gridLayout[index] = row+"x"+col;
+	  }
+	}
+      }
+      else if(prop=="SET_ITEM_STYLE" && !val.isEmpty()){
+	QString obj = val.section("::",0,0);
+	QString prop = val.section("::",1,1);
+	QString var = val.section("::",2,2);
+	if(obj.toLower()=="toolbar"){ tbFormat[4].append( prop+": "+var+"; "); }
+	else{
+          int index = getObjectIndex(obj);
+	  if(index != -1){ objStyleSheet[index].append( prop+": "+var+"; "); }
+	}
+      }
+
+    } // end if line is not a comment or empty
+  } // end reading lines from file
   file.close();
-  */
+  
 }
 
 int Theme::getObjectIndex(QString obj){
@@ -123,6 +246,17 @@
   return TRUE;
 }
 //********** WINDOW OBJECTS *************
+QString Theme::objectStyleSheet(QString obj){
+  QString output;
+  if(obj.toLower()=="toolbar"){
+    output = tbFormat[4].simplified();
+  }else{
+    int i = getObjectIndex(obj);
+    output = objStyleSheet[i].simplified();
+  }
+  return output;
+}
+
 QString Theme::objectIconStyle(QString obj){
   int i = getObjectIndex(obj);
   bool invalid = FALSE;
@@ -185,7 +319,7 @@
   int i = getObjectIndex(obj);
   QString col = gridLayout[i].section("x",1,1).section("-",1,1);
   if(col.isEmpty()){ return 1; }
-  int colSpan = col.toInt() - objectLocationColumn(obj);
+  int colSpan = col.toInt() - objectLocationColumn(obj) + 1;
   if(colSpan < 1){ colSpan=1; }
   return colSpan;
 }

Modified: pcbsd-projects/PCDM/pcdm-themes.h
===================================================================
--- pcbsd-projects/PCDM/pcdm-themes.h	2012-07-17 15:22:13 UTC (rev 17798)
+++ pcbsd-projects/PCDM/pcdm-themes.h	2012-07-17 19:25:25 UTC (rev 17799)
@@ -22,6 +22,7 @@
   static int windowWidth();
   static int windowHeight();
   //Window objects
+  static QString objectStyleSheet(QString);
   static QString objectIconStyle(QString);
   static QString objectIconPath(QString);
   static QSize objectIconSize(QString);

Modified: pcbsd-projects/PCDM/sample.pcdm-theme
===================================================================
--- pcbsd-projects/PCDM/sample.pcdm-theme	2012-07-17 15:22:13 UTC (rev 17798)
+++ pcbsd-projects/PCDM/sample.pcdm-theme	2012-07-17 19:25:25 UTC (rev 17799)
@@ -3,64 +3,66 @@
 ########################################
 # **** NOTE: Any option that is not set here will use the default PCDM setting *****
 
+
+##########################
+##    BASIC SETTINGS    ##
+##########################
+
 ## Base directory for images (if absolute path not explicitly declared) ##
 IMAGE_DIR=/usr/local/share/PCDM/images  #location of all/most image files for this theme
 
-
 #### Images (relative to IMAGE_DIR) ####
-BACKGROUND_IMAGE=background.jpg  # will fit to the window size if possible
-SPLASHSCREEN_IMAGE=default-splash.png #Image to use as a splash screen (set to "disabled" if none)
+BACKGROUND_IMAGE=background.jpg  	# will fit to the window size if possible
+SPLASHSCREEN_IMAGE=default-splash.png 	# Image to use as a splash screen
+HEADER_IMAGE=default-header.jpg 	# Image to be displayed as a window header
+  HEADER_IMAGE_SIZE=800x200		  # Size for the image (in pixels)
+USER_IMAGE=default-user.png  		# Image for the user selection pulldown
+  USER_IMAGE_SIZE=64x64  		  # Size for the image (in pixels)
+PASSWORD_IMAGE=default-password.png  	# Default image for the password entry box
+  PASSWORD_IMAGE_SIZE=64x64		  # Size for the image (in pixels)
+LOGIN_IMAGE=default-login.png  		# Small image contained in the login button (auto-scaled)
+DESKTOP_IMAGE=default-de-select.png	# Default Image for the DE selection
+  DESKTOP_IMAGE_SIZE=64x64		  # Size for the image (in pixels)
+# Images that will scale according to the toolbar size
+SYSTEM_IMAGE=default-system.png  	# Image for the System box (shutdown/reboot options)
+LOCALE_IMAGE=language-setting.png  	# Image for language selection
+KEYBOARD_IMAGE=keyboard-layout.png  	# Image for keyboard layout selection
+VIRTUAL_KEYBOARD_IMAGE=xvkbd.png	# Image for the virtual keyboard item
 
-#### Screen Display ####
+# TOOLBAR SETTINGS
+WINDOW_TOOLBAR_LOCATION=bottom # [bottom | top | left | right]
+TOOLBAR_DEFAULT_SIZE=32x32     # Set the default size for all images in the toolbar
+TOOLBAR_STYLE=icononly 	 # [icononly | textonly | textbesideicon | textundericon]
 
-# MAIN WINDOW DISPLAY #
-WINDOW_DISPLAY=fullscreen # [fullscreen|manual]  #if manual, will be centered in the screen
-WINDOW_SIZE=800x600  # Width & Height in pixels (if set to manual)
+# ADD WINDOW ITEMS ON A GRID LAYOUT
+# FORMAT: WINDOW_ITEM=<item>::<relative icon location>::[row,column]
+  # <item>: [header | login | user | password | desktop]
+  # <relative icon location>: [above|below|left|right|none]
+  # [row,column]: positive integers designating grid point(s) to use for the object (starting at 0)
+  # Note: [0,0]=upper left corner, grid automatically expands to fit all items 
+WINDOW_ITEM=header::icononly::[0,0-2] #(required) "none" disables header image, anything else keeps it
+WINDOW_ITEM=user::above::[2,0]        	#(required) username input display
+WINDOW_ITEM=password::above::[2,1]    	#(required) password input display
+WINDOW_ITEM=login::left::[2,2]        #(required) login icon MUST be "none" or "left"
+WINDOW_ITEM=desktop::left::[4,1]     #(required) Desktop environment switcher
+  #optional spacers to help format the display
+WINDOW_ITEM=spacer::vertical::[1,1]	#Add a vertical spacer between the header and user
+WINDOW_ITEM=spacer::vertical::[3,1]	#Add a vertical spacer between the desktop and login
+WINDOW_ITEM=spacer::horizontal::[1,0]	#Add a horizontal spacer to the left of the user
+WINDOW_ITEM=spacer::horizontal::[1,2]	#Add a horizontal spacer to the right of the user
 
-  # ADD WINDOW ITEMS ON A GRID LAYOUT
-  WINDOW_GRID_SIZE=[7,3]  # number of [rows,columns] to fill the window
-  # FORMAT: WINDOW_ITEM=<item>::<relative icon location>::[row,column]
-    # <item>: [header | login | user | password]
-    # <relative icon location>: [above|below|left|right|none] (not used for header item)
-    # [row,column]: positive integers designating grid point(s) to use for the object (starting at 0)
-    # Note: [0,0]=upper left corner, therefore if number of rows=4, valid row entries are 0->3 
-  WINDOW_ITEM=header::icononly::[0,0-2] # MUST be "icononly" or "none"
-  HEADER_IMAGE=default-header.png  	# Default image to be displayed as a window header
+  
+#####################
+# ADVANCED SETTINGS #
+#####################
 
-  WINDOW_ITEM=user::left::[2,1]        	#(required) username input display
-  USER_IMAGE=default-user.png  		# Default image for the user selection pulldown
-  USER_IMAGE_SIZE=64x64  		# Size for the image (in pixels)
-
-  WINDOW_ITEM=password::left::[3,1]    	#(required) password input display
-  PASSWORD_IMAGE=default-password.png  	# Default image for the password entry box
-  PASSWORD_IMAGE_SIZE=64x64		# size for the image (in pixels)
-
-  WINDOW_ITEM=login::left::[4,1]        #(required) login icon MUST be "none" or "left"
-  LOGIN_IMAGE=default-login.png  	# Small image contained in the login button (auto-scaled)
-
-  WINDOW_ITEM=desktop::above::[6,1]     #(required) Desktop environment switcher
-  DE_SELECT_IMAGE=default-de-select.png # (required) Default image for the DE selection pulldown
-
-  WINDOW_ITEM=spacer::vertical::[1,1]	#Add a vertical spacer between the header and user
-  WINDOW_ITEM=spacer::vertical::[5,1]	#Add a vertical spacer between the desktop and login
-  WINDOW_ITEM=spacer::horizontal::[3,0]	#Add a horizontal spacer to the left of the user
-  WINDOW_ITEM=spacer::horizontal::[3,2]	#Add a horizontal spacer to the right of the user
-
-  # ADD TOOLBAR ITEMS
-  WINDOW_TOOLBAR_LOCATION=bottom # [bottom,top,left,right]
-  TOOLBAR_DEFAULT_SIZE=32x32     # Set the default size for all images in the toolbar
-  TOOLBAR_STYLE=icononly 	 # [icononly | textonly | textbesideicon | textundericon]
-  # FORMAT: TOOLBAR_ITEM=<item>::<style>
-    # <item>: [keyboard | locale | desktop | system]
-    # <style>: [currentstyle | pulldown]
-  TOOLBAR_ITEM=system::currentstyle	#(required) system options MUST exist
-  SYSTEM_IMAGE=default-system.png  	# Default image for the System box (shutdown/reboot options)
-
-  TOOLBAR_ITEM=locale::pulldown		#(optional) locale switcher
-  LOCALE_IMAGE=language-setting.png  	# Default image for language selection pulldown
-
-  TOOLBAR_ITEM=keyboard::pulldown	#(optional) keyboard layout switcher
-  KEYBOARD_IMAGE=keyboard-layout.png  	# Default image for keyboard layout selection pulldown
-    
-
-
+#---- Set the Qt Style Sheet properties of individual items ----
+# FORMAT: SET_ITEM_STYLE=<item>::<property>::<value>
+  # <item>: [login | user | password | desktop | toolbar]
+  # <property>: Qt Style Sheet properties (see http://doc.qt.nokia.com/4.7/stylesheet-reference.html)
+  # <value>: color/image to associate with the QStyleSheet property
+#SET_ITEM_STYLE=toolbar::background-color::rgb(255,0,0) 	#red background for item
+#SET_ITEM_STYLE=toolbar::color::black 			#black foreground/text for the item
+#SET_ITEM_STYLE=toolbar::selection-background-color::black #black background when selected
+#SET_ITEM_STYLE=toolbar::selection-color::red		#red text when selected
+SET_ITEM_STYLE=user::font-size::32px			#set the font to size 32



More information about the Commits mailing list