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: 1075
Registered: September 2012
Location: Poland, Kraków
Senior 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 209 times)


U++ - 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: 526
Registered: March 2007
Contributor
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: 1075
Registered: September 2012
Location: Poland, Kraków
Senior 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


U++ - 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 messageGo to next message
Lance is currently offline  Lance
Messages: 526
Registered: March 2007
Contributor
Thank you for the clarification!
Re: [PATCH READY] New plugin/icons/silk [message #56083 is a reply to message #55996] Fri, 22 January 2021 13:14 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
I do not like the idea much. This is not the only set available. It also seems that you replace duplication with unused entities.

Also, while we use it widely, in like 30% cases icons are actually altered (last case being UppHub icon...)

Re: [PATCH READY] New plugin/icons/silk [message #56084 is a reply to message #56083] Fri, 22 January 2021 13:14 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
That said, if you move it to GitHub, I think this would be a great addition to UppHub.
Previous Topic: how to convert view point to logic point
Next Topic: PDF file from Report
Goto Forum:
  


Current Time: Fri Mar 29 02:53:44 CET 2024

Total time taken to generate the page: 0.01137 seconds