[openbeos] Re: Patch: Prettifying the default decorator

  • From: "François Revol" <revol@xxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Fri, 23 Feb 2007 22:32:52 +0100 CET

> build help from Ingo and Jerome. Once I have the decorators building
> again, I'll get the Appearance app at least up-and-running on a basic
> level so people can change the system colors and the current
> decorator. :-)
>

Great, I was thinking about adding some WindowShade-like hack-the-
palette prog :P

Btw, how do you keep the Be decor and the default one in server/app/ in
sync ?
shouldn't they just be merged ?

It would be nice to be able to share themes with Zeta, at least on the
format level even if not all features are supported yet.
The files are plain text structured dump of BMessages (alike the dano
PrintToStream)
I can donate the writer and parser funcs, I'll have to clean them up
anyway as they aren't very robust.

I think the way it's done in Zeta makes it unintrusive enough you can
just forget about it if you don't like themes, yet powerful enough you
can customize enough to feel at home.

The fact it's BMessage based make it easily expandable. I originally
wrote addons to handle colors in Eddie and Pe, store winamp skins for
CL-Amp and SoundPlay...
I'll see if I can donate the whole code for the backend as well (it's
one of the few things I designed correctly and not in a hurry). Some
features should already work (setting Terminal prefs if it handles the
correct what codes, background pics&colors, sounds...).

I noted we already have more ui_color()s than R5. We probably don't
need to reuse the Dano string-based version and additional stuff
anyway.

One theme attached for reference.

François.
// new BMessage
BMessage('ZThm') {
        z:theme:infos = BMessage(0x00000000) {
                z:theme:name = string("Stargate Atlantis", 17 bytes)
                z:theme:screenshot = string("screenshot.png", 14 bytes)
        }
        // Desktop backgrounds and color; please respect count and ordering of 
all fields!
        be:bgndimginfo = BMessage(0x00000000) {
                // If true, use desktop color as icon text background
                be:bgndimginfoerasetext[0] = bool(false)
                be:bgndimginfoerasetext[1] = bool(false)
                be:bgndimginfoerasetext[2] = bool(false)
                be:bgndimginfoerasetext[3] = bool(false)
                be:bgndimginfoerasetext[4] = bool(false)
                be:bgndimginfoerasetext[5] = bool(false)
                be:bgndimginfoerasetext[6] = bool(false)
                // Actual backdrop image file
                be:bgndimginfopath[0] = 
string("/boot/home/config/settings/UIThemes/Stargate Atlantis/Stargate Atlantis 
Base/SGA Wallpaper/SGAWallpaper.jpg", 107 bytes)
                be:bgndimginfopath[1] = 
string("/boot/home/config/settings/UIThemes/Stargate Atlantis/Stargate Atlantis 
Base/SGA Wallpaper/sAtlantis4.jpg", nn bytes)
                be:bgndimginfopath[2] = 
string("/boot/home/config/settings/UIThemes/Stargate Atlantis/Stargate Atlantis 
Base/SGA Wallpaper/sAtlantis5.jpg", nn bytes)
                be:bgndimginfopath[3] = 
string("/boot/home/config/settings/UIThemes/Stargate Atlantis/Stargate Atlantis 
Base/SGA Wallpaper/sAtlantis6.jpg", nn bytes)
                be:bgndimginfopath[4] = 
string("/boot/home/config/settings/UIThemes/Stargate Atlantis/Stargate Atlantis 
Base/SGA Wallpaper/sAtlantis7.jpg", nn bytes)
                be:bgndimginfopath[5] = 
string("/boot/home/config/settings/UIThemes/Stargate Atlantis/Stargate Atlantis 
Base/SGA Wallpaper/sAtlantis8.jpg", nn bytes)
                be:bgndimginfopath[6] = 
string("/boot/home/config/settings/UIThemes/Stargate Atlantis/Stargate Atlantis 
Base/SGA Wallpaper/mirko_gaterium.jpg", nn bytes)
                // Workspaces each backdrop apply to
                be:bgndimginfoworkspaces[0] = int32(1)
                be:bgndimginfoworkspaces[1] = int32(2)
                be:bgndimginfoworkspaces[2] = int32(4)
                be:bgndimginfoworkspaces[3] = int32(8)
                be:bgndimginfoworkspaces[4] = int32(16)
                be:bgndimginfoworkspaces[5] = int32(32)
                be:bgndimginfoworkspaces[7] = int32(-1)
                // Origin point for mode 0
                be:bgndimginfooffset[0] = BPoint(0.0, 0.0)
                be:bgndimginfooffset[1] = BPoint(0.0, 0.0)
                be:bgndimginfooffset[2] = BPoint(0.0, 0.0)
                be:bgndimginfooffset[3] = BPoint(0.0, 0.0)
                be:bgndimginfooffset[4] = BPoint(0.0, 0.0)
                be:bgndimginfooffset[5] = BPoint(0.0, 0.0)
                be:bgndimginfooffset[6] = BPoint(0.0, 0.0)
                // image mode: 0=use_origin, 1=centered, 2=scaled, 3=tiled
                be:bgndimginfomode[0] = int32(1 or 0x1)
                be:bgndimginfomode[1] = int32(1 or 0x1)
                be:bgndimginfomode[2] = int32(1 or 0x1)
                be:bgndimginfomode[3] = int32(1 or 0x1)
                be:bgndimginfomode[4] = int32(1 or 0x1)
                be:bgndimginfomode[5] = int32(1 or 0x1)
                be:bgndimginfomode[6] = int32(1 or 0x1)
                be:bgndimginfoset[0] = int32(0 or (nil))
                be:bgndimginfoset[1] = int32(0 or (nil))
                be:bgndimginfoset[2] = int32(0 or (nil))
                be:bgndimginfoset[3] = int32(0 or (nil))
                be:bgndimginfoset[4] = int32(0 or (nil))
                be:bgndimginfoset[5] = int32(0 or (nil))
                be:bgndimginfoset[6] = int32(0 or (nil))
                // one per workspace, up to the last changing one
                be:desktop_color = rgb_color(0,0,0,255)
        }
        // Deskbar position
        deskbar_settings = BMessage(0x00000000) {
                // Deskbar on-screen position
                db:location = int32(3 or 0x3)
                // Deskbar is expanded
                db:expanded = bool(true)
        }
        // Screensaver settings
        screensaver_settings = BMessage(0x00000000) {
                // Screensaver active module
                screensaver:modulename = string("GalaxyScreenSaver", 17 bytes)
        }
        // Sounds Settings
        sounds_settings = BMessage(0x00000000) {
                AIM: Received Message = BMessage('SndI') {
                }
                BeShare-DLFinished = BMessage('SndI') {
                }
                BeShare-InactivChat = BMessage('SndI') {
                }
                BeShare-Name Said = BMessage('SndI') {
                }
                BeShare-NoComplete = BMessage('SndI') {
                }
                BeShare-Private Msg = BMessage('SndI') {
                }
                BeShare-PrivateWndw = BMessage('SndI') {
                }
                BeShare-ULFinished = BMessage('SndI') {
                }
                BeShare-ULStarted = BMessage('SndI') {
                }
                BeShare-WatchedUser = BMessage('SndI') {
                }
                Beep = BMessage('SndI') {
                        // Filename for this sound event
                        sounds:file = string("/BeOS 5 
System/home/Stargate/Atlantis/downloads/Program Files/Plus!/Themes/Stargate 
Atlantis Base/SGA Sounds/SGADefault.wav", 123 bytes)
                        // Volume for this sound event
                        sounds:volume = float(0.820000)
                }
                IM Message Received = BMessage('SndI') {
                }
                InfoPopper: Important Message = BMessage('SndI') {
                }
                InfoPopper: Information Message = BMessage('SndI') {
                }
                Key Down = BMessage('SndI') {
                }
                Key Repeat = BMessage('SndI') {
                }
                Key Up = BMessage('SndI') {
                }
                Mouse Down = BMessage('SndI') {
                }
                Mouse Up = BMessage('SndI') {
                }
                New E-mail = BMessage('SndI') {
                        // Filename for this sound event
                        sounds:file = 
string("/boot/home/config/settings/UIThemes/Stargate Atlantis/Stargate Atlantis 
Base/SGA Sounds/SGANewMail.wav", 102 bytes)
                        // Volume for this sound event
                        sounds:volume = float(0.200000)
                }
                Startup = BMessage('SndI') {
                        // Filename for this sound event
                        sounds:file = 
string("/boot/home/config/settings/UIThemes/Stargate Atlantis/Stargate Atlantis 
Base/SGA Sounds/SGAStartup.wav", 102 bytes)
                        // Volume for this sound event
                        sounds:volume = float(0.200000)
                }
                Vision Nick Notification = BMessage('SndI') {
                }
                Window Activated = BMessage('SndI') {
                }
                Window Close = BMessage('SndI') {
                        // Filename for this sound event
                        sounds:file = 
string("/boot/home/config/settings/UIThemes/Stargate Atlantis/Stargate Atlantis 
Base/SGA Sounds/SGAClose.wav", 100 bytes)
                        // Volume for this sound event
                        sounds:volume = float(0.010000)
                }
                Window Minimized = BMessage('SndI') {
                        // Filename for this sound event
                        sounds:file = 
string("/boot/home/config/settings/UIThemes/Stargate Atlantis/Stargate Atlantis 
Base/SGA Sounds/SGAMinimize.wav", 103 bytes)
                        // Volume for this sound event
                        sounds:volume = float(0.010000)
                }
                Window Open = BMessage('SndI') {
                        // Filename for this sound event
                        sounds:file = 
string("/boot/home/config/settings/UIThemes/Stargate Atlantis/Stargate Atlantis 
Base/SGA Sounds/SGAOpen.wav", 99 bytes)
                        // Volume for this sound event
                        sounds:volume = float(0.010000)
                }
                Window Restored = BMessage('SndI') {
                }
                Window Zoomed = BMessage('SndI') {
                        // Filename for this sound event
                        sounds:file = 
string("/boot/home/config/settings/UIThemes/Stargate Atlantis/Stargate Atlantis 
Base/SGA Sounds/SGAMaximize.wav", 103 bytes)
                        // Volume for this sound event
                        sounds:volume = float(0.010000)
                }
        }
        // Terminal Preferences
        terminal_prefs = BMessage(0x00000000) {
                // Terminal column count
                term:cols = int32(80 or 0x50)
                // Terminal row count
                term:rows = int32(24 or 0x18)
                // Terminal tab width
                term:tab = int32(8 or 0x8)
                // Terminal font
                term:font = BFont(Courier10 BT/Roman/12.0, shear=90.0, rot=0.0, 
height=10.2949+3.58594+0.0)
                // Terminal background color
                term:c:bg = rgb_color(60,60,60,0)
                // Terminal foreground color
                term:c:fg = rgb_color(222,222,222,0)
                // Terminal cursor background color
                term:c:curbg = rgb_color(150,150,150,255)
                // Terminal cursor foreground color
                term:c:curfg = rgb_color(255,255,0,0)
                // Terminal selection background color
                term:c:selbg = rgb_color(144,161,179,255)
                // Terminal selection foreground color
                term:c:selfg = rgb_color(255,255,255,0)
                // Terminal text encoding
                term:encoding = int32(0 or (nil))
        }
        // UI Settings
        ui_settings = BMessage(0x00000000) {
                // Panel Background
                be:c:PanBg = rgb_color(160,160,160,255)
                // Panel Text
                be:c:PanTx = rgb_color(0,0,0,255)
                // Panel Link
                be:c:PanLn = rgb_color(0,0,204,255)
                // Document Background
                be:c:DocBg = rgb_color(192,192,192,255)
                // Document Text
                be:c:DocTx = rgb_color(0,0,0,255)
                // Document Link
                be:c:DocLn = rgb_color(0,0,204,255)
                // Control Background
                be:c:CtlBg = rgb_color(100,100,100,255)
                // Control Text
                be:c:CtlTx = rgb_color(0,0,0,255)
                // Control Border
                be:c:CtlBr = rgb_color(127,127,127,255)
                // Control Highlight
                be:c:CtlHg = rgb_color(71,212,232,255)
                // Navigation Base
                be:c:NavBs = rgb_color(127,127,127,255)
                // Navigation Pulse
                be:c:NavPl = rgb_color(192,204,168,255)
                // Shine
                be:c:Shine = rgb_color(136,132,128,255)
                // Shadow
                be:c:Shadow = rgb_color(16,12,0,255)
                // ToolTip Background
                be:c:TipBg = rgb_color(185,245,253,255)
                // ToolTip Text
                be:c:TipTx = rgb_color(0,0,0,255)
                // Menu Background
                be:c:MenBg = rgb_color(127,127,127,255)
                // Menu Selected Background
                be:c:MenSBg = rgb_color(71,212,232,255)
                // Menu Item Text
                be:c:MenTx = rgb_color(0,0,0,255)
                // Menu Selected Item Text
                be:c:MenSTx = rgb_color(15,61,85,255)
                // Menu Selected Border
                be:c:MenSBr = rgb_color(200,200,200,255)
                // Success
                be:c:Success = rgb_color(0,255,0,255)
                // Failure
                be:c:Failure = rgb_color(255,0,0,255)
                // Menu Item Text
                be:f:MenTx = BFont(Bangle Thin/Normal/16.0, shear=90.0, 
rot=0.0, height=11.5547+2.83008+0.0)
                // Menu Separator
                be:MenSep = int32(0 or (nil))
                // Show Menu Triggers
                be:MenTrig = bool(false)
                // Menu ZSnake
                be:MenZSnake = bool(true)
                // ToolTip
                be:f:Tip = BFont(Bangle Thin/Normal/14.0, shear=90.0, rot=0.0, 
height=9.62891+2.3584+0.0)
                // System Plain
                be:f:be_plain_font = BFont(Bitstream Vera Sans/Roman/11.0, 
shear=90.0, rot=0.0, height=10.2104+2.59424+0.0)
                // System Bold
                be:f:be_bold_font = BFont(Bitstream Vera Sans/Bold/12.0, 
shear=90.0, rot=0.0, height=11.1387+2.83008+0.0)
                // System Fixed
                be:f:be_fixed_font = BFont(Monospac821 BT/Roman/12.0, 
shear=90.0, rot=0.0, height=11.5547+2.83008+0.0)
        }
        // Window decorations and scrollbars
        window_decorations = BMessage(0x00000000) {
                // Window decor
                window:decor = string("Smoke", 5 bytes)
                // Window decor parameters
                window:decor_globals = BMessage(0x00000000) {
                        BWindow = BMessage(0x00000000) {
                                f:Floater Title = BFont(Bitstream Vera 
Sans/Roman/11.0, shear=90.0, rot=0.0, height=10.2104+2.59424+0.0)
                                b:Buttons Need Focus = int32(0 or (nil))
                                f:Inactive Title = rgb_color(28,115,122,255)
                                f:Active Title = rgb_color(255,255,255,255)
                                f:WindowTitle = BFont(Bitstream Vera 
Sans/Bold/11.0, shear=90.0, rot=0.0, height=10.2104+2.59424+0.0)
                        }
                }
        }
}

Other related posts: