Recent

Author Topic: Material Design  (Read 19242 times)

lainz

  • Hero Member
  • *****
  • Posts: 4470
    • https://lainz.github.io/
Re: Material Design
« Reply #45 on: May 27, 2018, 05:18:09 pm »
You can clearly see it's a different type. Look at the 'g' for example. If you chose a type like arial at least for debugging, you can maybe better solve your font size problem.

Yes, but in general it looks the same (same size, that was the original problem), comparing the two screenshots.

lainz

  • Hero Member
  • *****
  • Posts: 4470
    • https://lainz.github.io/
Re: Material Design
« Reply #46 on: June 05, 2018, 07:38:03 pm »
New MaterialDesign 0.0.4
https://github.com/bgrabitmap/materialdesign/releases

Implemented TextProportional and TextProportionalRatio properties.

With this options you can scale the height of text based on the height of the control and a given ratio.

For example:
- TextProportional: True
- TextProportionalRatio: 0.5
- Height: 50

Font height will be 50 * 0.5 = 25

Is not intended as a fix to the font height problems across systems, but I'm using it in a project, that's the only reason I added it.

Font.Height is by default 0 by now. The only way to change height for now is using TextProportional and  TextProportionalRatio, until I found time and a good way to solve it, for normal DPI and High DPI.

Also I've added TextAutoSize property, that indicates if use text size to measure optimal width and height of the control. This can be used for example if you have a grid of MDButton, and want all of them have the same size, regarding of the text that's inside them. (If not set, you will have wider buttons and that doesn't look good in a grid).

As the other functions, I'm using it on a project, that's the reason I've added that functionality.

lainz

  • Hero Member
  • *****
  • Posts: 4470
    • https://lainz.github.io/
Re: Material Design
« Reply #47 on: July 28, 2018, 05:31:02 am »
Hi, sorry I did not take more much time into this. Im planning to make a theme with bitmaps like Firemonkey does * (yes planning, that finally can happen or not as always ) *.

But I already have something working that I actually forget I already made that can help me into that task
https://forum.lazarus.freepascal.org/index.php/topic,24176.msg292806.html#msg292806

and also this one (huge thanks to felipemdc)
https://github.com/bgrabitmap/bgracontrols/tree/master/test/test_extra/slicescaling_customdrawn_win7

Thanks!

This MDButton will be integrated into BGRAControls, but I will change the name so there is no collision or breaks of existing projects.

Sorry for any inconvenience, hope you used this component and was useful.
« Last Edit: July 28, 2018, 05:41:12 am by lainz »

 

TinyPortal © 2005-2018