Welcome, Guest
Please Login or Register.    Lost Password?

Continuous calendar ("compact calendar")
(1 viewing) (1) Guest
Go to bottomPage: 12345
TOPIC: Continuous calendar ("compact calendar")
#14494
Re:Continuous calendar ( 3 Years, 6 Months ago  
joes wrote:
Wow, you are fast! Thanks, Jorge Luis and Rainy!
Jorge, I tried the addon and it works fine! I tried to add a fourth month to the triple compact xml, but it is not showing. Are the 3 months somehow wired into the lua script, too?
Yes, month-1 is static, month and month+1 are located with the script in the function Shadow4_Triple_Compact_SetMonthsPosition (using the previous month). If you add a fourth month take care of end of years. (month -2, -1, 0, 13 or 14 aren't valid)
I see now that i forgot to change the showpostexdays value to 1 in the last month.

Rainy, I found the pre- and postshowcount variables. Very cool feature! Could it be accessed with the setup dialogs, too? I guess not too many people want to mess with the xmls...Yes again. You can add a variable (use skin.xml as template). You could use e.g. Pre_weeks_showed as variable name as replace in the xml files as %Pre_weeks_showed% instead of 0 or any number.

I tried preshow with 4 weeks and postshow with 8 and 12 -- nice
Now I only need to find a way to add the months names to the left of the calendar... have to try and understand what Jorge did in his addon.
In the addon i uploaded on deviantART the month names are located always in the same line as 1st of month. That because i only join the twelve months together . The problem here was join the months without leaving empty spaces.
I'm trying to do the same with pre and post, but the problem now is to find where is the 1st of each month. I tried using week numbers but the problem is that week numbers are different in Europe, America and Middle East . I've made a year working version for weeks starting on Sunday and Monday. But its more difficult to show the delta weeks version.

Thanks, both of you!
PS:
Jorge, your DoubleSized Shadow is great, too!
(OT) Why does the Shadow skin use bitmap fonts? Could it be done with a vector typeface?
The Shadow4 screen has a common size, i think. It works fine on small screens but isn't good on large screens. I saw many people asking about Shadow4's scale... and i started to getting bored . So, i did the double sized version.
You can change the element of day appeareance to "font.normal" but you will see that isn't the same thing.

Thanks you!
Jorge_Luis
Platinum Boarder
Posts: 792
graphgraph
User Offline Click here to see the profile of this user
Gender: Male My Rainlendar Skins Location: Argentina Birthday: 03/15
The administrator has disabled public write access.
 
#14497
Re:Continuous calendar ( 3 Years, 6 Months ago  
In the addon i uploaded on deviantART the month names are located always in the same line as 1st of month. That because i only join the twelve months together . The problem here was join the months without leaving empty spaces.
I'm trying to do the same with pre and post, but the problem now is to find where is the 1st of each month. I tried using week numbers but the problem is that week numbers are different in Europe, America and Middle East . I've made a year working version for weeks starting on Sunday and Monday. But its more difficult to show the delta weeks version.

What a liar i am!!!

I think that finally ( ) made the pre-weeks and post-weeks. Also i made the year compact calendar work on every weekday start.
Again, i submitted it to deviantART: jorgeluis-jorgeluis.deviantart.com/art/Compact-Calendar-1-1-197199850
Jorge_Luis
Platinum Boarder
Posts: 792
graphgraph
User Offline Click here to see the profile of this user
Gender: Male My Rainlendar Skins Location: Argentina Birthday: 03/15
The administrator has disabled public write access.
 
#14512
Re:Continuous calendar ("compact calendar") 3 Years, 6 Months ago  
Thanks again, Jorge! This is a very nice add-on!

You can change the element of day appeareance to "font.normal" but you will see that isn't the same thing.
I couldn't keep myself from trying that.... And once you start...
First I just used font.normal, then I tried another font. Then I wanted to see if it was possible to get the "shadow" with vector fonts. I found that you can have two <appearances> for a <day>. If you use levels, you can put one (darker) font behind the other, and if you use offset="+1,+2", it actually looks good.
But then I saw that there is an effect="SHADOW" used in elements.xml. This is much cleaner, of course.

So currently I've got this "compact weeks.xml":
Code:


<?xml version="1.0" encoding="UTF-8" ?>
<skin version="1.0">
  <elements>
    <font id="font.cday" facename="Calibri" weight="BOLD" size="12" />
<font id="font.cdayshadow" facename="Calibri" weight="BOLD" size="12" />
<font id="font.cweekend" facename="Calibri" size="12" />
<font id="font.cweeknr" facename="Calibri" size="8" />
<font id="font.cyear" facename="Calibri" size="16" />
<font id="font.cweekday" facename="Calibri" size="10" />
<font id="font.cmonths" facename="Calibri" weight="BOLD" size="16" />
  </elements>
  <colors>
    <color id="color.days1" rgba="255,255,255,255" />
<color id="color.days2" rgba="224,224,224,255" />
<color id="color.weekends1" rgba="255,96,160,255" />
<color id="color.weekends2" rgba="255,96,160,224" />
<color id="color.shadows" rgba="0,0,0,128" />
  </colors>
  <window id="Week Compact Calendar" w="280" h="21 * (%Pre_weeks_number% + %Post_weeks_number% + 6) + 24" threshold="48" default="0" oncreate="Shadow4_Weeks_Compact_Initialize('#SKIN#', '#ID#')">
    <year id="Week Compact Calendar.year" element="font.cyear" x="0" y="-100" w="110" align="CENTER" showmonth="0" />
    <month id="Week Compact Calendar.month1" element="font.cmonths" x="0" y="-100" w="110" align="CENTER-RIGHT" showmonth="1" />
    <month id="Week Compact Calendar.month2" element="font.cmonths" x="0" y="-100" w="110" align="CENTER-RIGHT" showmonth="2" />
    <month id="Week Compact Calendar.month3" element="font.cmonths" x="0" y="-100" w="110" align="CENTER-RIGHT" showmonth="3" />
    <month id="Week Compact Calendar.month4" element="font.cmonths" x="0" y="-100" w="110" align="CENTER-RIGHT" showmonth="4" />
    <month id="Week Compact Calendar.month5" element="font.cmonths" x="0" y="-100" w="110" align="CENTER-RIGHT" showmonth="5" />
    <month id="Week Compact Calendar.month6" element="font.cmonths" x="0" y="-100" w="110" align="CENTER-RIGHT" showmonth="6" />
    <month id="Week Compact Calendar.month7" element="font.cmonths" x="0" y="-100" w="110" align="CENTER-RIGHT" showmonth="7" />
    <month id="Week Compact Calendar.month8" element="font.cmonths" x="0" y="-100" w="110" align="CENTER-RIGHT" showmonth="8" />
    <month id="Week Compact Calendar.month9" element="font.cmonths" x="0" y="-100" w="110" align="CENTER-RIGHT" showmonth="9" />
    <month id="Week Compact Calendar.month10" element="font.cmonths" x="0" y="-100" w="110" align="CENTER-RIGHT" showmonth="10" />
    <month id="Week Compact Calendar.month11" element="font.cmonths" x="0" y="-100" w="110" align="CENTER-RIGHT" showmonth="11" />
    <month id="Week Compact Calendar.month12" element="font.cmonths" x="0" y="-100" w="110" align="CENTER-RIGHT" showmonth="12" />
    <month id="Week Compact Calendar.month13" element="font.cmonths" x="0" y="-100" w="110" align="CENTER-RIGHT" showmonth="1" />
    <calendar id="Week Compact Calendar.calendar" x="110" y="0" w="160" h="21 * (%Pre_weeks_number% + %Post_weeks_number% + 6) + 24" layout="GRID" showmonth="0" keeptodayinplace="0" postshowcount="%Post_weeks_number%" preshowcount="%Pre_weeks_number%">
      <days>
<appearance priority="-1" element="font.cday" color="color.days1" effect="SHADOW" effectcolor="color.shadows" align="CENTER" />
      </days>
      <weekends>
        <appearance priority="-1" element="font.cweekend" color="color.weekends1" effect="SHADOW" effectcolor="color.shadows" align="CENTER" />
      </weekends>
      <exdays showpreexdays="1" showpostexdays="1">
        <appearance priority="-1" element="font.cday" color="color.days2" effect="SHADOW" effectcolor="color.shadows" align="CENTER" />
      </exdays>
      <exweekends>
        <appearance priority="-1" element="font.cweekend" color="color.weekends2" effect="SHADOW" effectcolor="color.shadows" align="CENTER" />
      </exweekends>
      <events>
        <appearance priority="0" element="font.cday" color="color.cyan" effect="SHADOW" effectcolor="color.shadows" align="CENTER" />
      </events>
      <today>
        <appearance layer="10" element="bitmap.today.%Today_shape%" align="CENTER" />
      </today>
      <weeknums>
        <appearance visible="%Show_week_numbers%" element="font.cweeknr" color="color.grey" align="CENTER" />
      </weeknums>
      <weekdays abbreviate="1">
        <appearance element="font.cweekday" color="color.grey" align="CENTER" />
      </weekdays>
</calendar>
  </window>
</skin>



This looks nice enough, but the special categories (like work, holidays) still use the bitmap font. It's actually a good contrast, but I'll probably try to change this, too. It might be easier to change something in the main files of shadow4. Well... this might be a complete vector shadow skin then...

One problem: the names of months and the year are not shown anymore.
I tried changing the x and y values, and the names start showing up.
So I guess some of my changes are in conflict with the lua script that calculates where to put the names?
I don't understand exactly what the script does, I've never seen lua before. It seems to break apart some strings into variables first? That could be the reason it's not working now.

In the end, if everything fits nicely with the vector font, maybe it will be possible to use a multiplier variable for all the sizes. So if you set the size to 150 percent, it scales the font and not a picture of the small font. Do you think this could work?
joes
Fresh Boarder
Posts: 15
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#14513
Re:Continuous calendar ("compact calendar") 3 Years, 6 Months ago  
Hm? the code doesn't show?
Trying again...
Code:


<skin version="1.0">
  <elements>
    <font id="font.cday" facename="Calibri" weight="BOLD" size="12" />
<font id="font.cdayshadow" facename="Calibri" weight="BOLD" size="12" />
<font id="font.cweekend" facename="Calibri" size="12" />
<font id="font.cweeknr" facename="Calibri" size="8" />
<font id="font.cyear" facename="Calibri" size="16" />
<font id="font.cweekday" facename="Calibri" size="10" />
<font id="font.cmonths" facename="Calibri" weight="BOLD" size="16" />
  </elements>
  <colors>
    <color id="color.days1" rgba="255,255,255,255" />
<color id="color.days2" rgba="224,224,224,255" />
<color id="color.weekends1" rgba="255,96,160,255" />
<color id="color.weekends2" rgba="255,96,160,224" />
<color id="color.shadows" rgba="0,0,0,128" />
  </colors>
  <window id="Week Compact Calendar" w="280" h="21 * (%Pre_weeks_number% + %Post_weeks_number% + 6) + 24" threshold="48" default="0" oncreate="Shadow4_Weeks_Compact_Initialize('#SKIN#', '#ID#')">
    <year id="Week Compact Calendar.year" element="font.cyear" x="0" y="-100" w="110" align="CENTER" showmonth="0" />
    <month id="Week Compact Calendar.month1" element="font.cmonths" x="0" y="-100" w="110" align="CENTER-RIGHT" showmonth="1" />
    <month id="Week Compact Calendar.month2" element="font.cmonths" x="0" y="-100" w="110" align="CENTER-RIGHT" showmonth="2" />
    <month id="Week Compact Calendar.month3" element="font.cmonths" x="0" y="-100" w="110" align="CENTER-RIGHT" showmonth="3" />
    <month id="Week Compact Calendar.month4" element="font.cmonths" x="0" y="-100" w="110" align="CENTER-RIGHT" showmonth="4" />
    <month id="Week Compact Calendar.month5" element="font.cmonths" x="0" y="-100" w="110" align="CENTER-RIGHT" showmonth="5" />
    <month id="Week Compact Calendar.month6" element="font.cmonths" x="0" y="-100" w="110" align="CENTER-RIGHT" showmonth="6" />
    <month id="Week Compact Calendar.month7" element="font.cmonths" x="0" y="-100" w="110" align="CENTER-RIGHT" showmonth="7" />
    <month id="Week Compact Calendar.month8" element="font.cmonths" x="0" y="-100" w="110" align="CENTER-RIGHT" showmonth="8" />
    <month id="Week Compact Calendar.month9" element="font.cmonths" x="0" y="-100" w="110" align="CENTER-RIGHT" showmonth="9" />
    <month id="Week Compact Calendar.month10" element="font.cmonths" x="0" y="-100" w="110" align="CENTER-RIGHT" showmonth="10" />
    <month id="Week Compact Calendar.month11" element="font.cmonths" x="0" y="-100" w="110" align="CENTER-RIGHT" showmonth="11" />
    <month id="Week Compact Calendar.month12" element="font.cmonths" x="0" y="-100" w="110" align="CENTER-RIGHT" showmonth="12" />
    <month id="Week Compact Calendar.month13" element="font.cmonths" x="0" y="-100" w="110" align="CENTER-RIGHT" showmonth="1" />
    <calendar id="Week Compact Calendar.calendar" x="110" y="0" w="160" h="21 * (%Pre_weeks_number% + %Post_weeks_number% + 6) + 24" layout="GRID" showmonth="0" keeptodayinplace="0" postshowcount="%Post_weeks_number%" preshowcount="%Pre_weeks_number%">
      <days>
<appearance priority="-1" element="font.cday" color="color.days1" effect="SHADOW" effectcolor="color.shadows" align="CENTER" />
      </days>
      <weekends>
        <appearance priority="-1" element="font.cweekend" color="color.weekends1" effect="SHADOW" effectcolor="color.shadows" align="CENTER" />
      </weekends>
      <exdays showpreexdays="1" showpostexdays="1">
        <appearance priority="-1" element="font.cday" color="color.days2" effect="SHADOW" effectcolor="color.shadows" align="CENTER" />
      </exdays>
      <exweekends>
        <appearance priority="-1" element="font.cweekend" color="color.weekends2" effect="SHADOW" effectcolor="color.shadows" align="CENTER" />
      </exweekends>
      <events>
        <appearance priority="0" element="font.cday" color="color.cyan" effect="SHADOW" effectcolor="color.shadows" align="CENTER" />
      </events>
      <today>
        <appearance layer="10" element="bitmap.today.%Today_shape%" align="CENTER" />
      </today>
      <weeknums>
        <appearance visible="%Show_week_numbers%" element="font.cweeknr" color="color.grey" align="CENTER" />
      </weeknums>
      <weekdays abbreviate="1">
        <appearance element="font.cweekday" color="color.grey" align="CENTER" />
      </weekdays>
</calendar>
  </window>
</skin>

joes
Fresh Boarder
Posts: 15
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#14514
Re:Continuous calendar ( 3 Years, 6 Months ago  
joes wrote:
This looks nice enough, but the special categories (like work, holidays) still use the bitmap font. It's actually a good contrast, but I'll probably try to change this, too. It might be easier to change something in the main files of shadow4. Well... this might be a complete vector shadow skin then...

One problem: the names of months and the year are not shown anymore.
I tried changing the x and y values, and the names start showing up.
So I guess some of my changes are in conflict with the lua script that calculates where to put the names?
I don't understand exactly what the script does, I've never seen lua before. It seems to break apart some strings into variables first? That could be the reason it's not working now.

In the end, if everything fits nicely with the vector font, maybe it will be possible to use a multiplier variable for all the sizes. So if you set the size to 150 percent, it scales the font and not a picture of the small font. Do you think this could work?

As you realized, you can change to bitmaps to use fonts. I found this old post from another user talking about the scale of Digital Clock. In that moment, I thought the same as you, and made a font DigiClock: www.rainlendar.net/cms/index.php?option=com_kunena&Itemid=42&func=view&catid=3&id=12788 (Mmmmmm... now I realize that I need to add the DigiClock to my Double Sized skin). For the categories, you will need to change the original elements.xml.

The idea of the code is more or less this:
Pre_weeks_number and Post_weeks_number are the names of the variables. You change these values on the Skin Options dialog. I need to recover these values to know where is the current 1st week of the month and, by the way, know the window's height (it's the same value I use on the xml file)
I need to keep in mind the values of the first week day (as said before, in Europe is usually Monday and in America is usually Sunday). Each day has a number (0 is Sunday, 6 is Saturday). So, the last day of the week will be first+6, but because after 6 goes 0, I need to take the module (%) of that number. Despite the first week day, every month starts at least 4 weeks after the 1st. Some months starts 5 weeks after, this happens if 29, 30 or 31 are on the last day of the week. Using that relation and the standard size of the bitmaps, I set the y value. If the y value goes off the window, I stop moving the names (on both directions, up and down).

I'm not sure about scaling fonts. Of course, if you change the font size (I think it's better than "percent") only need to move the names by pixels according to the size, but I leave that to you

Don't worry... before start using Rainlendar I only know Lua by name, and that was 1 year ago.

PS: I apologize if I make mistakes when I write. My English level isn't the best, but I learn every day on the forums. I hope that you understand me.
Jorge_Luis
Platinum Boarder
Posts: 792
graphgraph
User Offline Click here to see the profile of this user
Gender: Male My Rainlendar Skins Location: Argentina Birthday: 03/15
Last Edit: 2011/02/15 13:47 By Jorge_Luis.Reason: Tags edited
The administrator has disabled public write access.
 
#14516
Re:Continuous calendar ( 3 Years, 6 Months ago  
Thanks for explaining!
Something weird happened yesterday. All of a sudden, the months names were visible, as was the year. I thought maybe that was because of a re-boot, but today it's back to no months and year. Hm.

I'm not sure about scaling fonts. Of course, if you change the font size (I think it's better than "percent") only need to move the names by pixels according to the size, but I leave that to you
Yes, I was thinking of changing the font size and everything. It might be a bit time consuming to find the right pixel sizes for distances and window size etc... but I'm in no hurry.
joes
Fresh Boarder
Posts: 15
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 12345
get the latest posts directly to your desktop