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  |
 |
Klugier
Messages: 1099 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 260 times)
U++ - one framework to rule them all.
[Updated on: Sun, 10 January 2021 17:56] Report message to a moderator
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Tue Apr 22 14:38:38 CEST 2025
Total time taken to generate the page: 0.02383 seconds
|