Module ToolBarStandardButton for all OS and PB v6.00

Share your advanced PureBasic knowledge/code with the community.
User avatar
blueb
Addict
Addict
Posts: 1121
Joined: Sat Apr 26, 2003 2:15 pm
Location: Cuernavaca, Mexico

Re: Module ToolBarStandardButton for all OS and PB v6.00

Post by blueb »

Tanks infratec,

Even though Fred changed the icon size in beta 8.. this is better.

Old eyes and a 4k monitor, it would be nice if PureBasic allowed us to change icon sets to suit our needs.

I was never crazy about Kale's icon set.
- It was too lonely at the top.

System : PB 6.21(x64) and Win 11 Pro (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
User avatar
jacdelad
Addict
Addict
Posts: 2044
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: Module ToolBarStandardButton for all OS and PB v6.00

Post by jacdelad »

I get most of my icons for private use from iconarchive.com. Just saying...
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
infratec
Always Here
Always Here
Posts: 7691
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Module ToolBarStandardButton for all OS and PB v6.00

Post by infratec »

jacdelad wrote: Wed Jun 01, 2022 3:11 pm I get most of my icons for private use from iconarchive.com. Just saying...
Then you have to read the lincense for your downloaded icons very carefully :wink:
Fred needs really free icons, because he sell his product.
User avatar
jacdelad
Addict
Addict
Posts: 2044
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: Module ToolBarStandardButton for all OS and PB v6.00

Post by jacdelad »

infratec wrote: Thu Jun 02, 2022 7:49 am
jacdelad wrote: Wed Jun 01, 2022 3:11 pm I get most of my icons for private use from iconarchive.com. Just saying...
Then you have to read the lincense for your downloaded icons very carefully :wink:
Fred needs really free icons, because he sell his product.
That's why I wrote "private use".
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
User avatar
blueb
Addict
Addict
Posts: 1121
Joined: Sat Apr 26, 2003 2:15 pm
Location: Cuernavaca, Mexico

Re: Module ToolBarStandardButton for all OS and PB v6.00

Post by blueb »

I just renewed MS Office to 2021 from Office 2007... the first thing I noticed is 'Vector icons' everywhere!
I'm guessing they are a lot faster, take up less resources and are DPI aware.

Using VectorIcons.pbi, I'm sure someone could come up with a good looking set of PureBasic icons for the IDE. :mrgreen:
- It was too lonely at the top.

System : PB 6.21(x64) and Win 11 Pro (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
User avatar
mk-soft
Always Here
Always Here
Posts: 6388
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Module ToolBarStandardButton for all OS and PB v6.00

Post by mk-soft »

Update v1.6.4
- Fix macOS Ventura. Use small size of toolbar items not longer exits.

Since there are no more small toolbar items in Ventura, they will be redrawn centred so that the small icons are displayed better.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Amundo
Enthusiast
Enthusiast
Posts: 200
Joined: Thu Feb 16, 2006 1:41 am
Location: New Zealand

Re: Module ToolBarStandardButton for all OS and PB v6.00

Post by Amundo »

Better late than never, but:

Thank you mk-soft!!!!!!!!!!!!!
Win10, PB6.x, okayish CPU, onboard video card, fuzzy monitor (or is that my eyesight?)
"When the facts change, I change my mind" - John Maynard Keynes
User avatar
mk-soft
Always Here
Always Here
Posts: 6388
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Module ToolBarStandardButton for all OS and PB v6.00

Post by mk-soft »

Update v1.6.6
- MacOS Toolbar on TitleBar
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
Shardik
Addict
Addict
Posts: 2074
Joined: Thu Apr 21, 2005 2:38 pm
Location: Germany

Re: Module ToolBarStandardButton for all OS and PB v6.00

Post by Shardik »

Error on MacOS 10.15.7 'Catalina':
[ERROR] Object does not respond to method "setToolbarStyle:".
The error occurs in Procedure SetToolBarStyle() because the first supported version of setToolbarStyle: is MacOS 11:
Apple documentation wrote: toolbarStyle
The style that determines the appearance and location of the toolbar in relation to the title bar.
macOS 11.0+

So you should change

Code: Select all

      If OSVersion() > #PB_OS_MacOSX_10_14
to

Code: Select all

      If OSVersion() > #PB_OS_MacOSX_10_15


Another bug on Linux and Windows:
[COMPILER] Constant not found: #NSWindowToolbarStyleUnifiedCompact
In order to run your example also on Linux and Windows you have to change

Code: Select all

      SetToolBarStyle(0, #NSWindowToolbarStyleUnifiedCompact)
to

Code: Select all

      CompilerIf #PB_Compiler_OS = #PB_OS_MacOS
        SetToolBarStyle(0, #NSWindowToolbarStyleUnifiedCompact)
      CompilerEndIf

Thank you!
Collection of cross-platform examples with API functions to extend PureBasic
Post Reply