[PC-BSD Commits] r19525 - pcbsd-projects/PCDM
svn at pcbsd.org
svn at pcbsd.org
Tue Sep 25 11:52:20 PDT 2012
Author: kenmoore
Date: 2012-09-25 18:52:20 +0000 (Tue, 25 Sep 2012)
New Revision: 19525
Modified:
pcbsd-projects/PCDM/pcdm-themes.cpp
pcbsd-projects/PCDM/pcdm.theme
Log:
Cleanup the PCDM theme detection backend a bit, as well as the sample theme file
Modified: pcbsd-projects/PCDM/pcdm-themes.cpp
===================================================================
--- pcbsd-projects/PCDM/pcdm-themes.cpp 2012-09-25 18:38:11 UTC (rev 19524)
+++ pcbsd-projects/PCDM/pcdm-themes.cpp 2012-09-25 18:52:20 UTC (rev 19525)
@@ -10,7 +10,7 @@
void Theme::loadDefaults(QString vars){
if( vars=="all" ){
validLayouts.clear(); needText.clear(); objStruct.clear();
- validLayouts << "above" << "below" << "left" << "right" << "disabled" << "icononly" << "vertical" << "horizontal";
+ validLayouts << "enabled" << "disabled" << "vertical" << "horizontal";
needText << "user" << "password" << "login";
objStruct << "header" << "background" << "splashscreen" << "user" << "password" << "login" << "keyboard" << "locale" << "system" << "desktop" << "virt-keyboard";
}
@@ -39,22 +39,18 @@
gridWidth=5; gridHeight=6;
//Default Layout for the application (row x column)
imLayout.clear(); gridLayout.clear();
- imLayout << "icononly"; gridLayout << "0x0"; // [0]=Header
- imLayout << "icononly"; gridLayout << ""; // [1]=Background
- imLayout << "icononly"; gridLayout << ""; // [2]=Splash Screen
- imLayout << "left"; gridLayout << "2x0"; // [3]=User
- imLayout << "left"; gridLayout << "3x0"; // [4]=Password
- imLayout << "left"; gridLayout << "4x0"; // [5]=Login
- imLayout << "icononly"; gridLayout << ""; // [6]=Keyboard Layout
- imLayout << "icononly"; gridLayout << ""; // [7]=Locale
- imLayout << "icononly"; gridLayout << ""; // [8]=System
- imLayout << "horizontal"; gridLayout << "6x0"; // [9]=Desktop
- imLayout << "icononly"; gridLayout << ""; // [10]=Virtual Keyboard
+ imLayout << "enable"; gridLayout << "0x0"; // [0]=Header
+ imLayout << "enable"; gridLayout << ""; // [1]=Background
+ imLayout << "enable"; gridLayout << ""; // [2]=Splash Screen
+ imLayout << ""; gridLayout << ""; // [3]=User
+ imLayout << ""; gridLayout << ""; // [4]=Password
+ imLayout << "enable"; gridLayout << "2x0"; // [5]=Login
+ imLayout << "enable"; gridLayout << ""; // [6]=Keyboard Layout
+ imLayout << "enable"; gridLayout << ""; // [7]=Locale
+ imLayout << "enable"; gridLayout << ""; // [8]=System
+ imLayout << "horizontal"; gridLayout << "4x0"; // [9]=Desktop
+ imLayout << "enable"; gridLayout << ""; // [10]=Virtual Keyboard
spacers.clear();
- spacers << "vertical::1::0"; //vertical spacer at row 1, column 1
- spacers << "vertical::5::0"; //vertical spacer at row 5, column 1
- //spacers << "horizontal::0::0"; //horizontal spacer at row 2, column 0
- //spacers << "horizontal::0::2"; //horizontal spacer at row 2, column 2
}
if( (vars=="all") || (vars=="stylesheet") ){
@@ -62,13 +58,13 @@
objStyleSheet << ""; // [0]=Header
objStyleSheet << ""; // [1]=Background
objStyleSheet << ""; // [2]=Splash Screen
- objStyleSheet << "font-size: 24px"; // [3]=User
- objStyleSheet << "font-size: 18px"; // [4]=Password
+ objStyleSheet << ""; // [3]=User
+ objStyleSheet << ""; // [4]=Password
objStyleSheet << ""; // [5]=Login
objStyleSheet << ""; // [6]=Keyboard Layout (not used - toolbar style)
objStyleSheet << ""; // [7]=Locale (not used - toolbar style)
objStyleSheet << ""; // [8]=System (not used - toolbar style)
- objStyleSheet << "background: transparent;"; // [9]=Desktop
+ objStyleSheet << ""; // [9]=Desktop
objStyleSheet << ""; // [10]=Virtual Keyboard (not used - toolbar style)
//Flag the styles as being defaults
customStyle.clear();
@@ -76,7 +72,7 @@
}
if( (vars=="all") || (vars=="toolbar") ){
tbFormat.clear();
- tbFormat << "left"; // [0] Location [bottom | top | left | right]
+ tbFormat << "bottom"; // [0] Location [bottom | top | left | right]
tbFormat << "icononly"; // [1] Style [icononly | textonly | textbeside | textunder]
tbFormat << "44"; // [2] Width in pixels
tbFormat << "44"; // [3] Height in pixels
@@ -270,11 +266,11 @@
int i = getObjectIndex(obj);
bool invalid = FALSE;
QString output = imLayout[i].toLower();
- if(output=="none"){ output="disabled"; }
+ if(output=="disable"){ output="disabled"; }
if( (output=="icononly") && needText.contains(obj) ){ invalid=TRUE; }
if(!validLayouts.contains(output) || invalid){
- qDebug() << "PCDM: Invalid layout detected for" << obj << "- defaulting to \"left\"";
- return "left";
+ qDebug() << "PCDM: Invalid layout detected for" << obj << "- defaulting to \"enable\"";
+ return "enable";
}
return output;
}
Modified: pcbsd-projects/PCDM/pcdm.theme
===================================================================
--- pcbsd-projects/PCDM/pcdm.theme 2012-09-25 18:38:11 UTC (rev 19524)
+++ pcbsd-projects/PCDM/pcdm.theme 2012-09-25 18:52:20 UTC (rev 19525)
@@ -13,19 +13,25 @@
#### Images (relative to IMAGE_DIR) ####
BACKGROUND_IMAGE=background.jpg # will stretch to fill the screen
+
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)
+
USER_IMAGE=default-user.png # Image for the user selection widget
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 # 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)
+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
@@ -42,14 +48,15 @@
# [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,2] # *REQUIRED* (cannot be disabled)
+WINDOW_ITEM=login::enable::[2,1] # *REQUIRED* (cannot be disabled)
WINDOW_ITEM=desktop::horizontal::[4,1] # [disable | horizontal | vertical]
#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
+ # <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
#####################
@@ -66,5 +73,5 @@
#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
-SET_ITEM_STYLE=desktop::color::white
+SET_ITEM_STYLE=desktop::background::transparent #make the desktop selector background transparent
+SET_ITEM_STYLE=desktop::color::white #Make the desktop selector fonts white
More information about the Commits
mailing list