About Monkey 2 › Forums › Monkey 2 Development › Mark: incomprehensible style system
This topic contains 0 replies, has 1 voice, and was last updated by 
 AdamStrange
 2 years, 9 months ago.
- 
		AuthorPosts
 - 
		
			
				
July 11, 2016 at 7:53 am #2040
This is forwarded from the previous weird bitmap issue – see that one for the bitmap png wierdness
ok
OK further investigation with themes and styles. Mark WTF is going on with the style system: the padding, placement and borders? Noe of this makes any logical sense. I’ve been into the style code itself and it still makes no sense.
Can we look at this from the base up?
styles have the colors – check
then they have padding and borders – both of which can be negative?
What is the padding – how does it relate
what is the border – how does that relate?
How come they can have negative values?
The primitive is a view – lets just call it a control
I’m going to detail my own display manager here so you can compare:
- you have controls.
 - each control has a width/height size. That is what gives it the basic dimentions
 - I don’t use padding (space between controls), but i do have an inset value so a control could be drawn inset into it’s size
 - I don’t use borders (spacing inside the control) because each control can and does do something different
 - Each control has a parent. with the core window being the Uber parent
 - Each control can be Aligned in its parent <– a control manager
 - The sizes used are not pixel based, but grid based. the grid being based on the main window size. this allows for a UI to be properly scale if you want
 
Here is a picture of this very simple and easy to understand system with a pseudo tab or button bar:
A negative value would put you outside the parent drawing area and would be invalid
The buttons fill the space an align correctly (handled by the manager)
Please could you explain how your system operates?
I can understand the view
I can understand making a toolbar with a defined height – sorta, but it’s not obvious
I can see that adding a button to a view with a ‘fill’ being left aligned. <-where the size should be coming from the parent toolbar BUT ISN’T
I am not saying the code doesn’t work. I am saying it is opaque. there seems to be no (SIMPLE) logic to how it works. I can provide you with my control system code. I’ll even hold you hand for you.
I really want to get this sorted and know what/how the style /control system operates
Attachments:
 - 
		AuthorPosts
 
You must be logged in to reply to this topic.
