Zhorn Software
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Go down
avatar
bmclen
Posts : 11
Join date : 2021-05-08

Center Text in Skinner Element Empty Center Text in Skinner Element

Mon Jul 05, 2021 2:34 am
Hello All!
[1] Activate Skinner > Skin Preview > [X] Element  (see first image below)
[2] Load existing skin or start a new skin and create a TEXT element
[2a] Font > (o) Center  (see third image below)
[2b] Range   Left:-144  Top:24  Right:-12  Height:15
       The pink bar is defined by the RANGE settings; we know that.   Smile
       The TOP and HEIGHT are set as needed for the overall skin background shape
Center Text in Skinner Element Image_13
[3] The "element" (pink bar) is NOT centered visually, deliberately for this question
      I select the FONT area, and mark "(o) Center"
      I then update the INI and SSK files
      Upon applying that skin, the text in the element is NOT centered?  (see next image)
      Why?

[4] It seems you have to adjust the LEFT/RIGHT settings so the actual text *IS* centered visually, instead of mathematically!
      Here is the MACOS skin with "(o) Custom" set to    Last modified on  %MODIFIED%"
Center Text in Skinner Element Image_14

I suspect my problem is that the width of %MODIFIED% will change with two-digit months, and two-digit days.  :-)
But the above "Last..." text is waaay off center regardless.
Is there no way to center the custom text automatically using the text element settings?
*OR*
Should I select  FONT > LEFT  or  FONT > RIGHT and continue to adjust settings?  (which doesn't make sense to ME!  Smile )

Center Text in Skinner Element Image_15

I just need to understand how to achieve these results as centering is an aesthetic for me.   Smile

Thank you all for your expertise and insight! *WONDERFUL* and flexible tool!!  Couldn't live without it!

THANK YOU, TOM !!!! sunny
avatar
Guest
Guest

Center Text in Skinner Element Empty Re: Center Text in Skinner Element

Mon Jul 05, 2021 7:21 am
Center Text in Skinner Element 233310

I have no problems centering the text ( here it is the title ) inside an element ( the gray bar has the same parameters as the element ) .
I do not see why u used a negative left value in the element parameter ?


Last edited by Sooyke on Tue Jul 06, 2021 7:13 pm; edited 2 times in total
avatar
bmclen
Posts : 11
Join date : 2021-05-08

Center Text in Skinner Element Empty Re: Center Text in Skinner Element

Tue Jul 06, 2021 12:47 am
Hello Sooyke!

Thank you, as always, for the quick reply!

I just happened to discover that I had set RANGE > LEFT > MIDDLE !!!  The "middle" should actually be "Sides"!  That should help the calculation.  Smile

As to the negative value, yeah, that was likely an oversight from a left-over skin, I'M SURE!!  Smile

Please try the "(o) Custom" setting for a regular text element as shown in the bottom image of my original post to determine if the length of system variable (%MODIFIED%) is confusing the centering algorithm when included with text in the Custom input box:

"(o) Custom"   [Last Modified on  %MODIFIED%]   (a deliberate extra space was added after "on" for aesthetics)

Thank you for your research time on this!

Bruce
avatar
Guest
Guest

Center Text in Skinner Element Empty Re: Center Text in Skinner Element

Tue Jul 06, 2021 10:13 am
Center Text in Skinner Element 234111

I cannot find everything wrong...do you see the problem in preview to or only when you have the real sticky ?

I added some digits in modified in skinner but it is still centered in the text element .
avatar
bmclen
Posts : 11
Join date : 2021-05-08

Center Text in Skinner Element Empty Re: Center Text in Skinner Element

Thu Jul 08, 2021 1:34 am
Hello Sooyke!

I am using "Stickies Skin Designer v4.20".  When I highlight the "modified" text object in Layout > Elements, my Skin Preview doesn't show anything; YOUR preview makes sense (it contains a grey text-bar element WITH the info you've specified).  Do I need to upgrade?  I noticed you did *NOT*  mark  [X] Element under the Skin Preview window.  When I mark  [X] Element, I see a purple element bar that I created in the text element dialog box.  There is NO content - just the bar.  So, it would seem I need to enable a setting or two or upgrade.  Hmmm...

Your screen image shows, "09:19, Tuesday, ... 2021" in the "Created/Modified:" text box in the Skin Settings area.  What object did you create for your date info to appear in the grey element?  Since your element echoes this long date info, which is it?  Created or Modified?  :-)

I'll keep experimenting... LOTS of good stuff here!

Thanks, again!

Bruce
avatar
Guest
Guest

Center Text in Skinner Element Empty Re: Center Text in Skinner Element

Thu Jul 08, 2021 11:44 am
Center Text in Skinner Element 236010

You can edit the text in the default " skin settings " to change the modified time string . The grey bar has the same dimensions as the purple element indicator but as it is hardcoded as a horizontal bar it is also visible in a " real " sticky to verify if the text is centered .

Maybe you did not have any text in " custom " text because you did not see anything in preview ?

Skinner version is v4.20 i think it is the latest one.
Admin
Admin
Admin
Posts : 526
Join date : 2018-03-30
Location : London
http://www.zhornsoftware.co.uk

Center Text in Skinner Element Empty Re: Center Text in Skinner Element

Sat Jul 10, 2021 6:38 pm
With the text element selected, check the box under the preview "Highlight selected element" or "Element".  That will show you the bar that the text is getting drawn into.  I'd expect the text to be in the centre of that horizontal rectangle.

However, I hope/expect you'll find that the rectangle itself is the problem, and it's not what you expect.  Given your first screenshot I'd expect the "left" value to be about 5px, and the "right" value to be -8 - and both of those from "sides"?

Tom
Sponsored content

Center Text in Skinner Element Empty Re: Center Text in Skinner Element

Back to top
Permissions in this forum:
You can reply to topics in this forum