Jump to content

XCal - Skin Development


atreiu

Recommended Posts

Hi, i'm currently updating the XCal - MiniCal, to make it skinable.

Here is a Developers Preview of this new XCal. It is not yet ready for daily use, it isn't tested much and has known bugs, so it might be unstable and might crash your computer!

Please Backup your existing XCal-Folder, before testing this version!

I release it, because i need you, to create skins for it, and send them to me, so I can included some skins in the final release :)

XCal - MiniCal Skinning Tutorial

(If something is wrong, missing or not working, please leave a comment.)

A: Fast start

1. Navigate to ../xwindowsdock/docklets/xcal/themes - Folder in Windows Explorer.

2. Do never change or delete anything in the default folders "current/", "Mr Black/", "Mr White/"!!!

3. Duplicate the default skin-Folder "Mr White".

4. Rename your duplicated Folder. The Name of the Folder, is the Name of your skin.

5. Open and change the png-Files in this Folder, adjust the values in the "settings.ini".

6. Done. Open the XCal-Settings and select your Skin to test it, then zip the folder and share it in the Forum.

B: Advanced Information

1. MiniCal-Size

The general Size of the Minical is determinated by the "bg.png". You can set the general Size, by creating a "bg.png" with your preferred dimensions.

2. Color Values:

In the "settings.ini" you have to use Delphi Color Values, which are different from standard HTML-Colors.

You have to use this format: $00bbggrr

"$00" must stand in the front, "bb","gg","rr" are Hex-Values for blue, green and red. Default HTML would be the different sequence #rrggbb.

So Orange (#FF7F00 in html) should be $00007FFF in the settings.ini

3. Font Rendering:

Due to the way, i render the Font, you might end up with ugly font-edges (see second Screenshot).

There are three ways to avoid this (all have cons and pros):

a) Use a FontName of a Font, that doesn't have half-transparent edges. "MS Sans Serif" and "MS Serif" are such Fonts.

B) Use a Background-Color for the Panel where the font is located. "[General] GridBgColor=" and "[Title] BackgroundColor=" are the values in the ini-File.

c) (my favorite solution) Choose a Transparency Color, that is close to the color of your "bg.png". The ugly edges will still be drawn, but are nearly invisible now.

4. Font:

Please make sure, the user have the fonts you specified in the "settings.ini". Otherwise "Arial" will be used. So please provide a download-Link or include the Font, if legally possible.

5. FontStyle

Can be "bold", "italic" or "bold italic".

6. Preview Image:

"preview.png" should be 185 x 185px and contain your name. It is shown in the XCal-Settings Dialog.

7. Events:

Even if the [Event] section in the settings.ini is currently not used, please fill it to make the skin compatible with upcoming version. Test the values with the [Today] - Section, to see how it will look.

C: Tipps for skinning:

To apply your changes in the png-files or the ini-file, you have to restart the dock or, what is much faster:

1. close the MiniCal (if open)

2. enter XCal Settings (rightclick -> edit)

3. exit XCal Settings by pressing OK

4. open the MiniCal

post-90085-1233844286_thumb.png

post-89-1233844286_thumb.png

Link to comment
but what does this xcal run on? can you use it on rocketdock? cuz if it does run on rocketdock, that's just what i was looking for last night!

but if i have to switch to xwindows dock, i might give it a try.

Sorry, like everything here in the XWindowsDock-Forum, my XCal is for XWindowsDock only. But you can take the source-code, and port it to RocketDock, if you want. (Or try to find someone else, to do it, if you can't code)

Link to comment

Hey atreiu...

Where can I find a guide for the "$" colors, I know how to find hexadecimal like #FF1234 , but XCal it´s not supporting this, like I said, Im not a developer, so if you can help me with that my first skin will be pretty much done...

Thanks!

Edit:

I ask this cause I wanna change the background color of the current day, the lilltle square color

Link to comment
Hey atreiu...

Where can I find a guide for the "$" colors, I know how to find hexadecimal like #FF1234 , but XCal it´s not supporting this, like I said, Im not a developer, so if you can help me with that my first skin will be pretty much done...

Thanks!

Edit:

I ask this cause I wanna change the background color of the current day, the lilltle square color

Did you read section B - 2 of the tutorial? I tried to explain the color value there, but maybe my english isn't good enough :o

Please tell me, how I could make it more clear :)

#FF1234 in HTML would be $003412FF in the inifile. (values for Red & Blue are switched, $00 added to the front)

Link to comment
Ok, sorry, I didn´t saw that! but now´s ready!

Here´s the screenshot of how it looks on my computer...

Let me know if you want the file to include it on XCal.

And let me say you that I love the application! Let me know when´s ready

Looks very nice! :)

The new XCal final should be ready in about 1-2 days, so it would be really cool, if you could upload your skin-files, so i can include it into the release. Thanks!

PS: Can i include your XCal-Icon, too?

Link to comment
Yes: From now on, XCal isn't restricted to English anymore :) It takes the default system language, instead. ("Februar" is just "February" in german ;) )

Ahh. I see

#FF1234 in HTML would be $003412FF

Oh shoot... I had to deal with colours like that a while back... What exactly is it? I know it's not just Delphi.

I will consider doing one then... no guarantees :D

Link to comment

atreiu - I advise you, not to use TBlendFunction.SourceConstantAlpha to get alpha blend effect :) because it takes a lot of cpu and time... so just set it value equal 255 and use alpha blend effect during painting ;)

May be I'm not right, because I didn't look at your sources ;)

Link to comment
atreiu - I advise you, not to use TBlendFunction.SourceConstantAlpha to get alpha blend effect :) because it takes a lot of cpu and time... so just set it value equal 255 and use alpha blend effect during painting ;)

May be I'm not right, because I didn't look at your sources ;)

Once again im not a developer, but yes BOBAH, Im not sure if it´s cause I used the beta version as guide for the skin, but when I click to add XCal it takes a few secs to load, but once loaded I had no problem...

@atreiu

Does the reminder feature will be included with the docklet or I should start lookin for a good calendar application?

Link to comment
Ahh. I see

Oh shoot... I had to deal with colours like that a while back... What exactly is it? I know it's not just Delphi.

I will consider doing one then... no guarantees :D

@atreiu:

What about implementing this for colors?:

function HTMLColor (color : String) : Cardinal;

begin

Result := StrToInt (StringReplace (color, '#', '$', []));

Result := ((Result And $FF0000) shr 16) + (Result And $00FF00) + ((Result And $FF) shl 16);

end;

Link to comment
Guest
This topic is now closed to further replies.
×
×
  • Create New...