Author Topic: [SOLVED] Orbiter Clock for 800x600  (Read 424 times)

Armor Gnome

  • Guru
  • ****
  • Posts: 304
    • View Profile
[SOLVED] Orbiter Clock for 800x600
« on: February 03, 2014, 04:47:50 pm »
**EDIT UPDATE

In order to make the clock render correctly, you may depending on your orbiter resolution need to alter the clock font size.  I have found that a very nice size for 800x600 is a PixelHeight of 600.  Read on below if you would like to know how to change this value for other sized orbiter resolutions.

**ORIGINAL


My thanks to tschak for the clock addition.  I have it although rendered incorrectly and appreciate it already.  Starting a topic to ask for some assistance in making it render as intended.  What is happening now is when doing 4 digit time (anything after 9:59) it places the minute number off the far right side of the screen. 

I followed the steps outlined in the LinuxMCE at Home thread and will go over those now incase I missed or misread something.

1. Downloaded the HelveticaNeue-UltraLight.tff
2. web admin>SqlCVS>update>all - waited for "successfull" in the popped up window
3. Used a konqueror browser and used "fish://192.168.80.143" to graphically copy that .tff to my webDT. 
4.  ran the following from my core:
Code: [Select]
sudo -i
(password)
ssh 192.168.80.143
(password)
cd /usr/share/fonts/truetype/
dir
tc-cache
*dir returned a couple subfolders and HelveticaNeue-UltraLight.tff file

5. Via web admin I selected the webdt under orbiters and selected Full Regen
6. waited for status bars 1 & 2 and the words "orbiter regeneration complete"
7.  Quick reload router

** WebDT is using BlueCrystal skin, 800X600 UI1, everything else works smoothly and fits the skin
« Last Edit: February 04, 2014, 02:23:09 am by Armor Gnome »
I made a wiki!  Click here to check out my system.

Armor Gnome

  • Guru
  • ****
  • Posts: 304
    • View Profile
Re: Orbiter Clock
« Reply #1 on: February 03, 2014, 07:35:14 pm »
After reading some articles on fc-cache, I found a listing of various options.

fc-cache -fv

-f: force overwriting of font config files
-v: verbose to show me added fonts?

My network time is limited so prior to forcing a command that could system break what I have and put me back quite a while fixing/reinstalling, I am asking if trying this could possibly cause conflicts elsewhere?
I made a wiki!  Click here to check out my system.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5501
  • DOES work for LinuxMCE.
    • View Profile
Re: Orbiter Clock
« Reply #2 on: February 03, 2014, 10:27:45 pm »
So basically, font is too big... ok...

if you open mysql and

SELECT * from Style;

you'll see a PK_Style for Clock

Edit the StyleVariation table, and change the font size entry for clock, which is, I believe 840 pixels, to something smaller, see if this fixes it.

-Thom

Armor Gnome

  • Guru
  • ****
  • Posts: 304
    • View Profile
Re: Orbiter Clock
« Reply #3 on: February 04, 2014, 01:33:24 am »
I hope it doesn't come out sarcastic, you always manage to give an answer that still requires that I get lost and have to look things up to make sense of your instructions.  I knew what a mouse was when I first come across LMCE.  I am now asking questions about command line editing of mysql.

I have made it as far as figuring out how to look up the PK_Style using the SELECT * FROM Style;

So I have determined that the PK_Style ID # I am looking for is 27.  Somehow I need to now select 27 to view the StyleVariation, then I need to learn to edit a Cell.

db = pluto_main
table = Style
row = 27
column = StyleVariation?
cell = 840?   

I need to edit 840 to a smaller number, like 600.  Sound like I am on the right path?


I made a wiki!  Click here to check out my system.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5501
  • DOES work for LinuxMCE.
    • View Profile
Re: Orbiter Clock
« Reply #4 on: February 04, 2014, 01:44:47 am »
If you go into mysql, e.g.

Code: [Select]
mysql pluto_main -uroot

you now have access to the database that LinuxMCE uses internally.

If you do an SQL query, e.g.

Code: [Select]
SELECT * from Style;

You will see all the rows of the style table, corresponding to different "Styles" used by HA Designer to draw lots of things like "text".

Notice that one of the rows, has a description of Clock, this is PK_Style # 27.

If you then do a query of:

Code: [Select]
SELECT * from StyleVariation WHERE FK_Style = 27;

You'll see the information for style #27. PK_Style becomes FK_Style out of convention, because in the Style table, the Style is a primary key, whilst in the StyleVariation table, it is a Foreign Key (it references another table).

Note the columns in StyleVariation, particularly PixelHeight. This is the value we want to change.

If you then do an explicit query of:

Code: [Select]
UPDATE StyleVariation SET PixelHeight=600 WHERE FK_Style=27;

You've then changed the Pixel Height variation from 840 to 600.

After this point, you'll need to regenerate the orbiters.

-Thom

Armor Gnome

  • Guru
  • ****
  • Posts: 304
    • View Profile
Re: Orbiter Clock
« Reply #5 on: February 04, 2014, 01:56:52 am »
Very specific reply thank you.  I was reading about the UPDATE command but hadn't caught the second SELECT * FROM StyleVariation and had no idea before now PK and FK was primary and foreign key. 

600 was a guess, after UPDATE SET I will regen and try a few different values.  Once I have a clean look I will update my first post in this thread for other users who want the clock in 800 X 600.
 
I made a wiki!  Click here to check out my system.