Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » [PATCH READY] New plugin/icons/silk (Plugin with icons)
[PATCH READY] New plugin/icons/silk [message #55996] Sun, 10 January 2021 17:51 Go to next message
Klugier is currently offline  Klugier
Messages: 822
Registered: September 2012
Location: Poland, Kraków
Experienced Contributor
Hello,

I would like to start the discussion about adding default icon set for Upp framework. Right now you need to manually copy all resources from your disk to the destination .iml file. I created "plugin/icons/silk" which solves this problem.

Here is the GUI10 tutorial re-implementation with the SilkIcons set:
#include <CtrlLib/CtrlLib.h>
#include <plugin/icons/silk/SilkIcons.h>

using namespace Upp;

struct MyAppWindow : TopWindow {
    MenuBar menu;

    void Exit() {
        if(PromptOKCancel("Exit MyApp?"))
            Break();
    }

    void SubMenu(Bar& bar) {
        bar.Add("Exit", SilkIcons::DoorOut(), [=] { Exit(); });
    }

    MyAppWindow() {
        Title("My application with menu and images").Sizeable();

        AddFrame(menu);
        menu.Set([=](Bar& bar) {
            bar.Sub("Menu", [=](Bar& bar) { SubMenu(bar); });
        });
    }
};

GUI_APP_MAIN
{
    MyAppWindow().Run();
}


Please noticed that we are using this icon set in many places, however we are lack of one common places where all icons are store. This might lead to unnecessary duplication. Sometimes, sharing icons between packages is not trivial and requires additional work.

Silk icons are extensivly used by Upp framework since 2015. It is the main icon set for TheIDE and some GUI packages are also using it.

Klugier
  • Attachment: icons.zip
    (Size: 418.50KB, Downloaded 11 times)


Ultimate++ - one framework to rule them all.

[Updated on: Sun, 10 January 2021 17:56]

Report message to a moderator

Re: [PATCH READY] New plugin/icons/silk [message #56027 is a reply to message #55996] Sat, 16 January 2021 06:32 Go to previous messageGo to next message
Lance is currently offline  Lance
Messages: 371
Registered: March 2007
Senior Member
Hi Klugier:

Great job! I have a couple of questions:

How do I get a list of icons included in the silk library? And do I pay price for icons not used (are unused icons included in final program binary)?

Regards,
Lance
Re: [PATCH READY] New plugin/icons/silk [message #56030 is a reply to message #56027] Sat, 16 January 2021 15:15 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 822
Registered: September 2012
Location: Poland, Kraków
Experienced Contributor
Hello Lance,

Quote:

How do I get a list of icons included in the silk library? And do I pay price for icons not used (are unused icons included in final program binary)?

You can open plugin/icons/silk/SilkIcons.iml to check the available icons. You can also check available icons on Silk icon page. Please noticed that for consistency I used camel case instead of underscore notation. So, instead of "char_bar_add" it would be "CharBarAdd".

All icons are included to the final binary of the application if /plugin/icons/silk are attached. I measure the final application size (example) on Linux and it is 3,2 Mb. So, the price is relatively low.

Klugier


Ultimate++ - one framework to rule them all.
Re: [PATCH READY] New plugin/icons/silk [message #56031 is a reply to message #56030] Sat, 16 January 2021 15:20 Go to previous message
Lance is currently offline  Lance
Messages: 371
Registered: March 2007
Senior Member
Thank you for the clarification!
Previous Topic: how to convert view point to logic point
Next Topic: Drawing / Painter Difference,Usage,Manual
Goto Forum:
  


Current Time: Tue Jan 19 09:37:14 CET 2021

Total time taken to generate the page: 0.01440 seconds