icon size on MAC

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
maximand
Experienced Solver
Experienced Solver
Posts: 72
Joined: Fri Nov 11, 2011 5:44 pm
Location: Russia

icon size on MAC

Post by maximand » Thu Apr 30, 2020 9:31 pm

Dear wxGuru()
• wxWidgets 3.1.3 (wxMSW 10.0)
win.PNG
win.PNG (25.31 KiB) Viewed 462 times

The same code on MAC 10.15. The visible area is 16x16 but icon behind is 24x24.
mac_ico.png
mac_ico.png (52.27 KiB) Viewed 462 times

Code: Select all

….

    long style = wxTB_FLAT | wxTB_NODIVIDER;

    toolBar_ = new wxToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, style, "ToolBar");
    
    toolBar_->AddTool(MENU_NEW, _("New"), mmBitmap(png::NEW_DB), _("New Database"));
    toolBar_->AddTool(MENU_OPEN, _("Open"), mmBitmap(png::OPEN), _("Open Database"));
    toolBar_->AddSeparator();
    ......
    
    const wxBitmap mmBitmap(int ref)
{
    int x = Option::instance().getIconSize();

    switch (ref)
    {
    case ABOUT: return x == 16 ? wxBITMAP_PNG_FROM_DATA(about) : x == 24 ? wxBITMAP_PNG_FROM_DATA(about24) : x == 32 ? wxBITMAP_PNG_FROM_DATA(about32)
    .....
What's wrong? Please advise.
M$, VS2017, C++

User avatar
doublemax
Moderator
Moderator
Posts: 14954
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: icon size on MAC

Post by doublemax » Fri May 01, 2020 12:58 am

I don't work under OSX, but there was this post very recently: viewtopic.php?p=198455#p198455
As your fonts look blurry, too, maybe it's a related problem.
Use the source, Luke!

maximand
Experienced Solver
Experienced Solver
Posts: 72
Joined: Fri Nov 11, 2011 5:44 pm
Location: Russia

Re: icon size on MAC

Post by maximand » Fri May 01, 2020 6:34 am

The key is already there.
Last edited by maximand on Fri May 01, 2020 3:22 pm, edited 1 time in total.
M$, VS2017, C++

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4235
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: icon size on MAC

Post by ONEEYEMAN » Fri May 01, 2020 2:48 pm

Hi,
Are you testing on the Retina display?
Is there any other bitmaps than the regular ones?

Thank you.

maximand
Experienced Solver
Experienced Solver
Posts: 72
Joined: Fri Nov 11, 2011 5:44 pm
Location: Russia

Re: icon size on MAC

Post by maximand » Fri May 01, 2020 3:27 pm

I have only MAC Air (2019) for tests. I don't know what is the display are there.
I don't know even any IDE for this platform. I can't build any tests.

I am using VS2017 on Windows.
M$, VS2017, C++

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4235
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: icon size on MAC

Post by ONEEYEMAN » Fri May 01, 2020 4:51 pm

Hi,
You should install an Xcode (it is free) and build everything natively.
So install Xcode, command-line tools and then build wxWidgets and you application.

See if this will resolve it.

If you don't know - Google how to install Xcode and command-line tools on Mac.

Thank you.

Also - make sure you are building an Application Bundle for OSX.

maximand
Experienced Solver
Experienced Solver
Posts: 72
Joined: Fri Nov 11, 2011 5:44 pm
Location: Russia

Re: icon size on MAC

Post by maximand » Fri May 01, 2020 9:38 pm

I've used this instructions https://github.com/moneymanagerex/money ... h-homebrew
but exclude brew install wxmac gettext.
I've installed wx3.1.3 and gettext from source code.
As result this two command give me a package of my project:

cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --target package

I've installed Xcode but don't understand how to open my project and build it.

PS project build from sources on my MAC machine. I don’t think that Xcode will fix something.
PSS Thank you for you attention.
M$, VS2017, C++

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4235
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: icon size on MAC

Post by ONEEYEMAN » Sat May 02, 2020 5:49 pm

Hi,
Can you build the toolbar sample from the wxWidgets distribution and see whether it has the same issue?

Thank you.

Post Reply