Jump to content
  • entries
    943
  • comments
    5,899
  • views
    924,401

Clipping and Resizing


Josh

1,999 views

 Share

In Leadwerks GUI, any widget can be the child of another widget. If the child goes outside of the parent widget's area it will be clipped for both rendering and mouse events. Below you can see the button in the upper-left corner and the progress bar and slider on the right are clipped by the parent tabber.

 

blogentry-1-0-56934600-1469816198_thumb.jpg

 

A parent widget can also have a padding value which indents the area. The tabber uses padding on the top to display the tabs and make sure children don't appear on top of the tabs.

 

Leadwerks also allows you to set an edge mode for each each of each widget (left, right, top, and bottom). This controls how the widgets scale when the window is resized. Here you can see a slider and a listbox have been locked to the right and bottom edges, respectively, and are being stretched out when the window is made larger.

 

blogentry-1-0-96520500-1469816323_thumb.jpg

 

I am also interested in bringing LeadwerksGUI to Linux as a standalone library to replace GTK, QT, etc. It's MUCH easier to skin and add new widgets to this system, and it provides resolution independence for any DPI display. Here it is at 75% scaling:

 

blogentry-1-0-32647000-1469824677.jpg

 

And at 400%:

 

blogentry-1-0-24427100-1469826913_thumb.jpg

  • Upvote 7
 Share

1 Comment


Recommended Comments

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...