[PC-BSD Commits] r21291 - pcbsd-projects/PCDM
svn at pcbsd.org
svn at pcbsd.org
Fri Feb 1 11:00:38 PST 2013
Author: kenmoore
Date: 2013-02-01 19:00:38 +0000 (Fri, 01 Feb 2013)
New Revision: 21291
Added:
pcbsd-projects/PCDM/themeStruct.cpp
pcbsd-projects/PCDM/themeStruct.h
Modified:
pcbsd-projects/PCDM/pcdm-gui.cpp
pcbsd-projects/PCDM/pcdm.theme
Log:
Add the beginnings of a new theme structure for PCDM. It currently should be able to read the new format for the .theme file
Modified: pcbsd-projects/PCDM/pcdm-gui.cpp
===================================================================
--- pcbsd-projects/PCDM/pcdm-gui.cpp 2013-02-01 18:33:36 UTC (rev 21290)
+++ pcbsd-projects/PCDM/pcdm-gui.cpp 2013-02-01 19:00:38 UTC (rev 21291)
@@ -34,6 +34,8 @@
bgstyle.replace("BGIMAGE",Theme::background() );
style.append(bgstyle);
}
+ //Set the application style sheet
+ style.append(" "+Theme::appstylesheet);
this->setStyleSheet(style);
//get the default translation directory
translationDir = QApplication::applicationDirPath() + "/i18n/";
@@ -193,7 +195,7 @@
notice.setWindowTitle(tr("Invalid Username/Password"));
notice.setIcon(QMessageBox::Warning);
notice.setText(tr("Username/Password combination is invalid, please try again."));
- notice.setInformativeText("("+tr("Tip")+": "+tr("Make sure that caps-lock is turned off.")+")");
+ notice.setInformativeText("("+tr("Tip: Make sure that caps-lock is turned off.")+")");
notice.setStandardButtons(QMessageBox::Ok);
notice.setDefaultButton(QMessageBox::Ok);
notice.exec();
Modified: pcbsd-projects/PCDM/pcdm.theme
===================================================================
--- pcbsd-projects/PCDM/pcdm.theme 2013-02-01 18:33:36 UTC (rev 21290)
+++ pcbsd-projects/PCDM/pcdm.theme 2013-02-01 19:00:38 UTC (rev 21291)
@@ -17,7 +17,8 @@
SPLASHSCREEN_IMAGE=default-splash.png # Image to use as a splash screen while starting up
HEADER_IMAGE=default-header.jpg # Image to be displayed as a window header
- HEADER_IMAGE_SIZE=800x200 # Size for the image (in pixels)
+ HEADER_IMAGE_SIZE=800x200 # Size for the image (in pixels)
+ HEADER_DISABLE=FALSE # Flag to remove the header image entirely
USER_IMAGE=default-user.png # Image for the user selection widget
USER_IMAGE_SIZE=64x64 # Size for the image (in pixels)
@@ -27,51 +28,51 @@
LOGIN_IMAGE=default-login.png # 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)
+DESKTOP_IMAGE=default-de-select.png # Default Image for the DE selection if none found
+ DESKTOP_IMAGE_SIZE=64x64 # Size for the image (in pixels)
+ DESKTOP_ORIENTATION=horizontal # [horizontal | vertical]
# --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
+VKEYBOARD_IMAGE=xvkbd.png # Image for the virtual keyboard item
# 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_LOCATION=bottom # [bottom | top | left | right]
+TOOLBAR_IMAGE_SIZE=32x32 # Set the default size for all images in the toolbar
TOOLBAR_STYLE=icononly # [icononly | textonly | textbesideicon | textundericon]
-# ADD WINDOW ITEMS ON A GRID LAYOUT
-# FORMAT: WINDOW_ITEM=<item>::<relative icon location>::[row,column]
- # <item>: [header | login | desktop]
- # <item status>: [enable | disable] unless otherwise noted
- # [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::enable::[0,0-2]
-WINDOW_ITEM=login::enable::[2,1] # *REQUIRED* (cannot be disabled)
-WINDOW_ITEM=desktop::horizontal::[4,1] # [disable | horizontal | vertical]
+# ADD WINDOW ITEMS ON A GRID LAYOUT [row,column]
+# Note: [0,0]=upper left corner, grid automatically expands to fit all items
+HEADER_LOCATION=[0,0-2]
+LOGIN_LOCATION=[2,1]
+DESKTOP_LOCATION=[4,1]
- #optional spacers to help format the display
- # <item status>: [vertical | horizontal]
-WINDOW_ITEM=spacer::vertical::[1,1] #Add a vertical spacer between the header and login
-WINDOW_ITEM=spacer::vertical::[3,1] #Add a vertical spacer between the login and desktop
-WINDOW_ITEM=spacer::horizontal::[2,0] #Add a horizontal spacer to the left of the login
-WINDOW_ITEM=spacer::horizontal::[2,2] #Add a horizontal spacer to the right of the login
-
+#Add optional spacers to help format the display
+# FORMAT: "ADDSPACER=<orientation>::[row,column]" #<orientation> = [horizontal | vertical]
+ADDSPACER=vertical::[1,1]
+ADDSPACER=vertical::[3,1]
+ADDSPACER=horizontal::[2,0]
+ADDSPACER=horizontal::[2,2]
#####################
# ADVANCED SETTINGS #
#####################
-
-#---- 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
-SET_ITEM_STYLE=desktop::background::transparent #make the desktop selector background transparent
-SET_ITEM_STYLE=desktop::color::white #Make the desktop selector fonts white
+#This allows you to manually set the Qt Style Sheet for the application
+# Reference Material: http://doc.qt.nokia.com/4.7/stylesheet-reference.html
+# --- Main Widgets to Customize ---
+# Toolbar: QToolBar
+# All buttons: QToolButton
+# Login Widget User List: QComboBox
+# Login Widget Password Entry: QLineEdit
+# Login Widget Background/Frame: QGroupBox
+# Desktop Environment Icon Display: QGraphicsView
+# Desktop Environment Selector Buttons: QPushButton
+# ----------
+APP_STYLESHEET_START
+QComboBox{ font-size: 32px; }
+QGroupBox{ background-color: qlineargradient(x1: 0, x2: 0, y1: 0, y2: 1, stop: 0 lightblue, stop: 1 transparent); }
+QToolBar{ background-color: qlineargradient(x1: 0, x2: 0, y1: 0, y2: 1, stop: 0 lightblue, stop: 1 blue); }
+QGraphicsView{ background: white; color: black; }
+APP_STYLESHEET_STOP
More information about the Commits
mailing list