I found (I hope, the tests have given a positive answer) how to set the size of icons used for buttons and the toolbar.
Caution: as described in the documentation of the Qt library, you can only reduce the size.
Little brief from Nokia: "... the icons used must be at least of this size as the icons are only scaled down".
Here you can find more information http://doc.qt.nokia.com/4.7/qabstractit ... nSize-prop.
To achieve this goal, I had to move some pieces of source code from the "toolbar.prg" to "control.prg" to allow the same functionality as the definition of the dimension. Also, I removed some definitions (eg "cPicture") that were defined in both "toolbar.prg" and "toolbutton.prg" but already defined in "control.prg".
You can find these two new examples, which illustrate my update: "samples\button\demo_4.prg" and "samples\toolbar\demo_5.prg".
In particular, for the command "DEFINE BUTTON" I had to add a new command in the source "hmg.ch".
It is "IMAGESIZE w, h" which allows you (in the style HMG3/CLIPPER) to define the size of the icon in the button, with OOP you can use <:ImageWidth> AND <ImageHeight>.
ATTENTION: you must define both Width and Height of the icon ELSE the QT default management is used.
My commit is 632 and 633 (I loose the examples: I'm sorry).
Best regards
Button and Toolbar iconsize
Moderator: Rathinagiri
Button and Toolbar iconsize
Luigi from Italy
www.L3W.it
www.L3W.it
Re: Button and Toolbar iconsize
Hi Esgici
how are you? It's a lot of time that I don't write to you: I'm sorry.
It's my pleasure to contribute to this project
Ciaooo!
how are you? It's a lot of time that I don't write to you: I'm sorry.
It's my pleasure to contribute to this project
Ciaooo!
Luigi from Italy
www.L3W.it
www.L3W.it
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Button and Toolbar iconsize
Ciao Luigi
Thanks a lot, I'm fine and I wish you too are fine
I'm not a contributor for HMG4 for now, only follower
Ciaooo!
--
Esgici
Thanks a lot, I'm fine and I wish you too are fine
I'm not a contributor for HMG4 for now, only follower
Ciaooo!
--
Esgici
Viva INTERNATIONAL HMG