It is currently December 7th, 2021, 12:55 pm

Help with the background color : Lua Calendar

Help with creating, editing & fixing problems with skins
Fybe
Posts: 3
Joined: August 9th, 2021, 8:34 pm

Help with the background color : Lua Calendar

Post by Fybe »

Hello, I downloaded LuaCalenadar to match my custom wallpaper I made and I wanted the background of the caleandar to be the exact exadecimal code I put in attachment so I found the part of the code to change it but the problem is that it always appears darker than the real color I want :( I tried changing the opacity in the hexa code but it didn't work either. Could you please help me ? I want this exact color as the background

Thanks in advance !
You do not have the required permissions to view the files attached to this post.
User avatar
SilverAzide
Rainmeter Sage
Posts: 1674
Joined: March 23rd, 2015, 5:26 pm

Re: Help with the background color : Lua Calendar

Post by SilverAzide »

Well, my first question is where did you download LuaCalendar from? The official site is here: https://smurfier.github.io/LuaCalendar/

By default, LuaCalendar 6.0 appears to have a transparent background. As far as I can tell, there is a bug in the code that doesn't show any background regardless of the style options (Default, Enigma, etc.) offered by the skin, and no place to set the color either.

Right-click the skin and select Edit skin. Find the following code:

Code: Select all

[Background]
Meter=Image
MeterStyle=BackgroundStyle
The error is that there is no style named "BackgroundStyle". I'm assuming this is supposed to be defined in the proper include files (in the folder LuaCalendar\@Resources\Styles). You can add this style in the include file, or just modify the above [Background] meter.

Let's assume you want to do this properly. If so, open the Default.inc include file (or whichever one you prefer) in the @Resources\Styles folder. Add the following:

Code: Select all

[BackgroundStyle]
SolidColor=171,122,82
H=(#Bumper.top#+#Bumper.bottom#+(#C.h#+#Space.y#)*7+#C.h#)
W=(#C.w#*7+#Space.x#*6+#Bumper.x#*2)
You will need to fiddle with the H/W values to get it to show properly. Note that these instructions are for the original LuaCalendar 6.0; if you are using a different version or a version that has been modified, you are on your own.
Gadgets Wiki GitHub More Gadgets...
Fybe
Posts: 3
Joined: August 9th, 2021, 8:34 pm

Re: Help with the background color : Lua Calendar

Post by Fybe »

Hello! Thanks for your quick answer ! I hadn't the same version you gave me so I downloaded it and followed your instructions and it worked !

Now the only problem is the little grey thing under the calendar (joined a picture) do you maybe know where it could come from ? .. And the size which I would like to fit in the box around but I think that to make the calendar bigger I would have to make all the fonts bigger too wouldn't I ? And that will take me ages because I don't even know how to make the box around bigger..

Also could you maybe tell me where I can find the note to rename the days ? I looked on the official website documentation but can't find the StartOnMonday and DayLabels file they talk about.

You're of course not obligated to explain me anything you already helped me a lot :)

Thanks again!
You do not have the required permissions to view the files attached to this post.
User avatar
SilverAzide
Rainmeter Sage
Posts: 1674
Joined: March 23rd, 2015, 5:26 pm

Re: Help with the background color : Lua Calendar

Post by SilverAzide »

Fybe wrote: August 16th, 2021, 11:20 pm Hello! Thanks for your quick answer ! I hadn't the same version you gave me so I downloaded it and followed your instructions and it worked !

Now the only problem is the little grey thing under the calendar (joined a picture) do you maybe know where it could come from ? .. And the size which I would like to fit in the box around but I think that to make the calendar bigger I would have to make all the fonts bigger too wouldn't I ? And that will take me ages because I don't even know how to make the box around bigger..

Also could you maybe tell me where I can find the note to rename the days ? I looked on the official website documentation but can't find the StartOnMonday and DayLabels file they talk about.

You're of course not obligated to explain me anything you already helped me a lot :)

Thanks again!
Let me see if I can figure out where that gray line is coming from. I will get back to you on that.

Meanwhile, there is an option skin where you can change various settings, but it too is not working properly. Very unfortunate. You can open the Options skin by right-clicking the calendar and selecting LuaCalendar > Options > Options.ini. Alternatively, instead of this skin, the other way is to edit the options manually. To do this, open the file Settings.inc. Find and change the following variables:

Code: Select all

;Custom text for Weekday labels. Uses the following format: Sun|Mon|Tue|Wed|Thu|Fri|Sat
DayLabels=L|M|M|J|V|S|D

;Custom text for Month labels. Uses the following format: Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec
MonthLabels=January|February|March|April|May|June|July|August|September|October|November|December

;Set to 1 to have the week start on Monday
StartOnMonday=1
To customize the fonts, font size, etc.,, it is a rather tedious process, but it is not too difficult. LuaCalendar uses "themes", which are just special styles that you can change (sort of like CSS style sheets). Assuming you are using the Default style, open the Default.inc file. You will find a bunch of style measures that control every part of the calendar display. For example, say you want to change the font of the day labels (the week days). With a little experimenting (and maybe the docs on the website), you'll see a series of measures like this:

Code: Select all

[LblTxtSty]
H=#C.h#
W=#C.w#
X=#Space.X#R
Y=r
FontFace=Trebuchet MS
FontColor=255,255,255,150
SolidColor=255,255,255,25
FontSize=8
stringAlign=CenterCenter
AntiAlias=1
[LblTxtSty] controls the week label appearance. Change the FontFace and FontSize and other settings to whatever you like. You can make changes to the other styles to change the appearance of the days, the month label, the highlight on the current day, etc. Just be sure NOT to change any of the X/Y/H/W values. These are controlled by another set of variables that handle the spacing, so you want to open the Variables.inc file in that same folder as the Default.inc file. In there, you will see items like:

Code: Select all

;===== Positioning options =====
;Cell Dimensions - The dimensions of the individual string meters.
C.w=16
C.h=16
;Spacers and bumper
;Vertical space between cells
Space.x=11
;Horizontal space between cells
Space.y=4
;Space on left and right of calendar
Bumper.x=10
;Space on top of calendar
Bumper.top=3
;Space on bottom of calendar
Bumper.bottom=0
Change these values to control spacing and padding around the skin.
Gadgets Wiki GitHub More Gadgets...
User avatar
SilverAzide
Rainmeter Sage
Posts: 1674
Joined: March 23rd, 2015, 5:26 pm

Re: Help with the background color : Lua Calendar

Post by SilverAzide »

Fybe wrote: August 16th, 2021, 11:20 pm Now the only problem is the little grey thing under the calendar (joined a picture) do you maybe know where it could come from ?
I don't know where that grey line is coming from. Try to ignore it for now, and when you have adjusted your fonts and styles to make the calendar look closer to what you want, you can package it all up and post it here and perhaps I or someone else can figure out where the line is coming from.
Gadgets Wiki GitHub More Gadgets...
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4499
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Help with the background color : Lua Calendar

Post by eclectic-tech »

SilverAzide wrote: August 17th, 2021, 12:50 am Meanwhile, there is an option skin where you can change various settings, but it too is not working properly. Very unfortunate. You can open the Options skin by right-clicking the calendar and selecting LuaCalendar > Options > Options.ini.
The option skin was working for me, but did not do scaling which could avoid having to manually edit all of the style variables.

I corrected the missing background style discovered by SilverAzide and modified the option skin by adding a SCALER input; enter a value between 0.75 and 3 to scale any of the current styles (Default, Default New, Default Events, Default Weeks, Enigma). I added scaling to all of the defined size and positioning variables. For new styles, start with the default meta.txt, style.inc and variables.inc by copying them to a new style folder and editing for your style name and attributes.

Added an option to set a background color to the options skin.

Here is a screenshot of the default calendar and the updated option skin (Scaler added).
luacalendarScale2.png
To change the size, click the '1' under SCALER and type in a value between 0.75 and 3. Press ENTER to input the value. Then press SAVE to save and refresh the calendar.
This should make it a bit easier to resize the calendar as the OP desires.

An updated (separate) package, this will install to 'Skins\LuaCalendar-Scaleable'
It will not overwrite Smurfier's version! (Smurfier may incorporate some of these minor changes in the future)
LuaCalendar-Scaleable_6.0.2.rmskin

Edit: If you downloaded the previous version, I would recommend download/install this as a separate config, and re-install Smurfier's original.

Note: Another reason to use this one is that my "first draft" had a few glitches that caused error msgs and scroll not to work. V6.0.2 corrected some style issues with certain text sizes and truncates them to integers.
You do not have the required permissions to view the files attached to this post.
Fybe
Posts: 3
Joined: August 9th, 2021, 8:34 pm

Re: Help with the background color : Lua Calendar

Post by Fybe »

Thanks a lot to both of you for your patience and for the rework of the calendar app ! The scaler you added was SO usefull I'm so happy you did that thanks a lot eclectic-tech ! Hope this will be added too on the "official" version ! :)

And thanks SilverAzide for your patience and infos about the background color and all the other things you've explained to me !

You helped me both to have exactly what I wanted and I'm so happy with it ! :) (Yes I don't need that much to be happy :D)
You do not have the required permissions to view the files attached to this post.
User avatar
SilverAzide
Rainmeter Sage
Posts: 1674
Joined: March 23rd, 2015, 5:26 pm

Re: Help with the background color : Lua Calendar

Post by SilverAzide »

eclectic-tech wrote: August 17th, 2021, 2:53 am The option skin was working for me, but did not do scaling which could avoid having to manually edit all of the style variables.

I corrected the missing background style discovered by SilverAzide and modified the option skin by adding a SCALER input; enter a value between 0.75 and 3 to scale any of the current styles (Default, Default New, Default Events, Default Weeks, Enigma). I added scaling to all of the defined size and positioning variables. For new styles, start with the default meta.txt, style.inc and variables.inc by copying them to a new style folder and editing for your style name and attributes.
...
An updated package (Smurfier may incorporate some of these minor changes in the future)
This is fantastic! Thank you so much for this, ET! I'm gonna use your mod in my Gadgets suite. :thumbup:
Gadgets Wiki GitHub More Gadgets...
User avatar
CodeCode
Posts: 797
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Help with the background color : Lua Calendar

Post by CodeCode »

eclectic-tech wrote: August 17th, 2021, 2:53 am The option skin was working for me, but did not do scaling which could avoid having to manually edit all of the style variables.

I corrected the missing background style discovered by SilverAzide and modified the option skin by adding a SCALER input; enter a value between 0.75 and 3 to scale any of the current styles (Default, Default New, Default Events, Default Weeks, Enigma). I added scaling to all of the defined size and positioning variables. For new styles, start with the default meta.txt, style.inc and variables.inc by copying them to a new style folder and editing for your style name and attributes.

To change the size, click the '1' under SCALER and type in a value between 0.75 and 3. Press ENTER to input the value. Then press SAVE to save and refresh the calendar.
This should make it a bit easier to resize the calendar as the OP desires.
Sweeeet!

Thanks eclectic-tech. :thumbup: Replaced my other, less versatile, calendar...
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4499
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Help with the background color : Lua Calendar

Post by eclectic-tech »

Thanks! Glad you like the scale version!

Note: I updated the previous post with a completely separate "LuaCalendar-Scaleable" rmskin package. It corrected a few glitches my "first draft" created: scroll not working and occasional log error msgs.

I would strongly recommend using the "LuaCalendar-Scaleable" separate package available above, and re-installing Smurfier's original version as "LuaCalendar".

This way, my minor changes are separate from Smurfier's extensive work creating the calendar. :rosegift:

Enjoy! 8-)