Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


Sign in to follow this  
NoelC

BigMuscle, could you please explain the .layout a bit?

Recommended Posts

I have to admit, I've either missed something important or have a hole in my pattern recognition skills, but after fooling with the layout file for a good while, I still really just don't understand what the 3601 = TMT_SIZINGMARGINS and 3602 = TMT_CONTENTMARGINS sections do.

 

BigMuscle, could I trouble you to please describe in some detail what the numbers mean?

 

I've been trying to get all the borders to look good in the theme atlas I've been working on, and I can't seem to see the pattern to select the right numbers so that all the different windows have the right appearance. 

 

Also, can you advise how to increase the size of the margin?

 

Thanks!

 

-Noel

Share this post


Link to post
Share on other sites

Thanks, but...

 

 

- each line has format "x;y;z=a,b,c,d"
- x, y, z specify the part, its state and the property respectively
- a, b, c, d specify position rectangle in atlas image (for z = 8002) or the part sizing/content margins (for z = 3601/3602)
- see example layout file for description of individual part identifiers
- see MSDN documentation of GetThemeRect and GetThemeMargins function for further information
- line "CaptionHeight=n" allows you to change the size of caption buttons to "n" pixels
- everything after # is considered to the comment and is ignored
 

 

I already got the part about selecting the graphics from the PNG.

 

As much as I have learned, I just don't understand what is being specified (for z = 3601/3602) for the sizing/content margins.  Any chance you could add a few words to that definition?

 

-Noel

Share this post


Link to post
Share on other sites

Just briefly. When you have some image (e.g. for button), the sizing margin define which part of the image stays untouched (= rendered in same size as in atlas image) and which part will be resized (= stretched vertically/horizontally) to fit the requested area. Just imagine this - the image for a button in atlas has size 64x64 but you want to rendered in area of size 128x128.

 

The content margin just defines how the content (e.g. text, or button glyph) will be placed into the control.

Share this post


Link to post
Share on other sites

Ah, got it!  Thanks very much.  I always wondered how that was governed.

 

Now that I know what to look for I can probably derive what the 4 individual numbers do.

 

-Noel

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×