Skip to content

Commit

Permalink
Add icon
Browse files Browse the repository at this point in the history
  • Loading branch information
Darby Johnston committed Jul 4, 2024
1 parent f4a4859 commit 7c52cee
Show file tree
Hide file tree
Showing 9 changed files with 186 additions and 46 deletions.
18 changes: 9 additions & 9 deletions etc/Icons/Close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
75 changes: 75 additions & 0 deletions etc/Icons/CloseSmall.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion lib/tlPlay/ViewportColorWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace tl
setBackgroundRole(ui::ColorRole::Window);

p.closeButton = ui::ToolButton::create(context);
p.closeButton->setIcon("Close");
p.closeButton->setIcon("CloseSmall");

p.swatch = ui::ColorSwatch::create(context);

Expand Down
4 changes: 4 additions & 0 deletions lib/tlUI/IconLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ namespace
#include "Resources/Clear_96.h"
#include "Resources/Close_192.h"
#include "Resources/Close_96.h"
#include "Resources/CloseSmall_192.h"
#include "Resources/CloseSmall_96.h"
#include "Resources/Color_192.h"
#include "Resources/Color_96.h"
#include "Resources/Compare_192.h"
Expand Down Expand Up @@ -189,6 +191,7 @@ namespace tl
p.iconData[std::make_pair("BellowsOpen", 96)] = BellowsOpen_96_png;
p.iconData[std::make_pair("Clear", 96)] = Clear_96_png;
p.iconData[std::make_pair("Close", 96)] = Close_96_png;
p.iconData[std::make_pair("CloseSmall", 96)] = CloseSmall_96_png;
p.iconData[std::make_pair("Color", 96)] = Color_96_png;
p.iconData[std::make_pair("Compare", 96)] = Compare_96_png;
p.iconData[std::make_pair("CompareA", 96)] = CompareA_96_png;
Expand Down Expand Up @@ -246,6 +249,7 @@ namespace tl
p.iconData[std::make_pair("BellowsOpen", 192)] = BellowsOpen_192_png;
p.iconData[std::make_pair("Clear", 192)] = Clear_192_png;
p.iconData[std::make_pair("Close", 192)] = Close_192_png;
p.iconData[std::make_pair("CloseSmall", 192)] = CloseSmall_192_png;
p.iconData[std::make_pair("Color", 192)] = Color_192_png;
p.iconData[std::make_pair("Compare", 192)] = Compare_192_png;
p.iconData[std::make_pair("CompareA", 192)] = CompareA_192_png;
Expand Down
4 changes: 2 additions & 2 deletions lib/tlUI/MDIWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ namespace tl

p.titleLabel = Label::create(context);
p.titleLabel->setText(title);
p.titleLabel->setMarginRole(SizeRole::MarginSmall);
p.titleLabel->setMarginRole(SizeRole::MarginInside);
p.titleLabel->setHStretch(Stretch::Expanding);

p.closeButton = ToolButton::create(context);
p.closeButton->setIcon("Close");
p.closeButton->setIcon("CloseSmall");
p.closeButton->setToolTip("Close the window");

p.layout = VerticalLayout::create(context, shared_from_this());
Expand Down
33 changes: 33 additions & 0 deletions lib/tlUI/Resources/CloseSmall_192.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
const std::vector<uint8_t> CloseSmall_192_png = {
137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68,
82, 0, 0, 0, 20, 0, 0, 0, 20, 8, 6, 0, 0, 0, 141,
137, 29, 13, 0, 0, 0, 9, 112, 72, 89, 115, 0, 0, 29, 135,
0, 0, 29, 135, 1, 143, 229, 241, 101, 0, 0, 0, 25, 116, 69,
88, 116, 83, 111, 102, 116, 119, 97, 114, 101, 0, 119, 119, 119, 46,
105, 110, 107, 115, 99, 97, 112, 101, 46, 111, 114, 103, 155, 238, 60,
26, 0, 0, 1, 89, 73, 68, 65, 84, 56, 141, 181, 211, 221, 78,
194, 64, 16, 5, 224, 51, 91, 49, 38, 74, 141, 81, 193, 94, 27,
65, 9, 62, 132, 136, 47, 109, 68, 228, 9, 68, 13, 209, 87, 32,
162, 44, 251, 115, 195, 118, 187, 94, 88, 16, 76, 105, 183, 38, 206,
93, 187, 51, 95, 38, 219, 83, 224, 191, 74, 74, 217, 146, 82, 214,
202, 206, 105, 173, 35, 33, 68, 99, 241, 204, 82, 236, 194, 90, 219,
183, 214, 246, 202, 160, 90, 235, 200, 24, 211, 183, 214, 62, 204, 102,
179, 179, 37, 8, 96, 2, 96, 12, 160, 109, 173, 29, 104, 173, 163,
34, 76, 41, 85, 159, 207, 231, 119, 0, 154, 68, 52, 38, 162, 207,
181, 6, 41, 229, 49, 231, 252, 153, 115, 238, 56, 231, 175, 121, 168,
82, 170, 62, 157, 78, 71, 105, 239, 163, 16, 226, 48, 179, 209, 7,
245, 198, 124, 80, 31, 140, 54, 161, 214, 218, 30, 128, 75, 0, 111,
149, 74, 165, 227, 156, 75, 140, 49, 247, 68, 212, 2, 48, 100, 140,
117, 195, 48, 252, 240, 2, 83, 180, 150, 162, 109, 34, 26, 57, 231,
182, 0, 52, 243, 176, 92, 48, 99, 83, 20, 97, 192, 79, 108, 50,
139, 136, 152, 115, 46, 88, 121, 181, 19, 4, 193, 118, 222, 204, 70,
80, 107, 29, 197, 113, 60, 88, 220, 25, 17, 141, 0, 156, 27, 99,
110, 243, 194, 159, 9, 174, 134, 22, 192, 19, 99, 236, 134, 49, 118,
5, 224, 5, 37, 194, 191, 196, 86, 162, 49, 20, 66, 28, 45, 206,
126, 71, 74, 41, 117, 242, 103, 172, 52, 234, 131, 121, 163, 101, 176,
34, 148, 1, 64, 146, 36, 251, 0, 14, 240, 157, 179, 235, 48, 12,
39, 69, 96, 181, 90, 125, 15, 130, 160, 155, 126, 253, 189, 56, 142,
119, 215, 26, 132, 16, 141, 194, 31, 61, 123, 211, 26, 231, 252, 180,
236, 156, 119, 125, 1, 189, 203, 133, 239, 60, 79, 170, 1, 0, 0,
0, 0, 73, 69, 78, 68, 174, 66, 96, 130,
};
21 changes: 21 additions & 0 deletions lib/tlUI/Resources/CloseSmall_96.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const std::vector<uint8_t> CloseSmall_96_png = {
137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68,
82, 0, 0, 0, 10, 0, 0, 0, 10, 8, 6, 0, 0, 0, 141,
50, 207, 189, 0, 0, 0, 9, 112, 72, 89, 115, 0, 0, 14, 195,
0, 0, 14, 195, 1, 199, 111, 168, 100, 0, 0, 0, 25, 116, 69,
88, 116, 83, 111, 102, 116, 119, 97, 114, 101, 0, 119, 119, 119, 46,
105, 110, 107, 115, 99, 97, 112, 101, 46, 111, 114, 103, 155, 238, 60,
26, 0, 0, 0, 157, 73, 68, 65, 84, 24, 149, 117, 144, 193, 13,
194, 80, 12, 67, 237, 207, 29, 181, 251, 148, 170, 234, 10, 28, 42,
38, 68, 8, 177, 3, 59, 192, 4, 112, 234, 161, 137, 7, 64, 13,
23, 90, 125, 85, 159, 156, 28, 217, 178, 94, 2, 0, 112, 247, 10,
127, 102, 241, 146, 187, 87, 36, 159, 238, 222, 109, 67, 146, 122, 146,
143, 105, 154, 246, 0, 0, 51, 107, 36, 141, 146, 250, 172, 169, 149,
52, 46, 5, 92, 12, 51, 107, 82, 74, 55, 0, 167, 136, 248, 144,
188, 70, 196, 80, 215, 245, 189, 196, 211, 253, 154, 71, 51, 59, 228,
94, 202, 23, 146, 41, 211, 187, 98, 208, 221, 91, 0, 231, 136, 24,
230, 121, 62, 146, 188, 228, 204, 69, 240, 226, 129, 238, 94, 73, 122,
111, 153, 50, 230, 215, 250, 158, 85, 20, 102, 241, 190, 255, 148, 123,
251, 117, 198, 191, 150, 0, 0, 0, 0, 73, 69, 78, 68, 174, 66,
96, 130,
};
50 changes: 27 additions & 23 deletions lib/tlUI/Resources/Close_192.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,31 @@ const std::vector<uint8_t> Close_192_png = {
0, 0, 29, 135, 1, 143, 229, 241, 101, 0, 0, 0, 25, 116, 69,
88, 116, 83, 111, 102, 116, 119, 97, 114, 101, 0, 119, 119, 119, 46,
105, 110, 107, 115, 99, 97, 112, 101, 46, 111, 114, 103, 155, 238, 60,
26, 0, 0, 1, 56, 73, 68, 65, 84, 88, 133, 237, 150, 209, 74,
195, 48, 20, 134, 255, 211, 116, 119, 13, 34, 184, 162, 47, 208, 171,
250, 12, 226, 212, 183, 182, 48, 95, 65, 55, 244, 17, 68, 5, 99,
210, 222, 121, 26, 47, 54, 97, 40, 140, 158, 181, 235, 20, 206, 119,
25, 146, 156, 143, 19, 242, 39, 128, 162, 40, 138, 162, 40, 255, 14,
239, 125, 17, 66, 200, 165, 235, 66, 8, 185, 247, 190, 144, 172, 73,
164, 69, 188, 247, 5, 51, 207, 153, 185, 146, 72, 134, 16, 114, 102,
174, 152, 121, 46, 145, 20, 11, 18, 209, 59, 17, 189, 1, 40, 153,
249, 174, 105, 154, 179, 14, 114, 83, 102, 190, 5, 80, 18, 209, 71,
146, 36, 94, 90, 87, 68, 8, 97, 234, 156, 187, 119, 206, 69, 231,
220, 227, 54, 201, 159, 115, 235, 186, 62, 221, 171, 156, 68, 242, 96,
114, 93, 36, 135, 146, 163, 33, 36, 153, 185, 2, 112, 14, 224, 105,
50, 153, 204, 218, 182, 253, 220, 28, 75, 211, 244, 50, 203, 178, 231,
131, 8, 174, 37, 243, 181, 80, 9, 96, 177, 30, 46, 1, 44, 140,
49, 87, 214, 218, 151, 93, 247, 30, 68, 16, 248, 213, 73, 160, 103,
231, 190, 17, 199, 140, 4, 34, 234, 221, 128, 63, 127, 196, 189, 59,
184, 25, 194, 88, 29, 235, 141, 49, 102, 6, 224, 1, 130, 48, 223,
11, 219, 162, 68, 18, 230, 163, 203, 29, 92, 82, 18, 194, 163, 75,
238, 242, 66, 244, 145, 20, 95, 146, 24, 227, 113, 140, 241, 4, 171,
27, 122, 209, 37, 231, 172, 181, 175, 198, 152, 107, 34, 90, 198, 24,
143, 152, 217, 74, 235, 138, 24, 243, 195, 170, 40, 138, 162, 40, 253,
248, 2, 125, 81, 129, 54, 236, 155, 173, 107, 0, 0, 0, 0, 73,
69, 78, 68, 174, 66, 96, 130,
26, 0, 0, 1, 123, 73, 68, 65, 84, 88, 133, 237, 213, 223, 78,
194, 48, 24, 135, 225, 223, 215, 137, 49, 81, 102, 140, 10, 114, 108,
4, 67, 240, 34, 84, 188, 105, 35, 34, 87, 32, 106, 136, 222, 2,
65, 165, 244, 207, 9, 93, 169, 7, 142, 100, 33, 70, 40, 140, 160,
73, 223, 195, 173, 221, 158, 44, 219, 55, 32, 20, 10, 133, 66, 161,
80, 54, 41, 101, 93, 74, 89, 242, 221, 167, 181, 174, 8, 33, 170,
190, 251, 152, 207, 98, 41, 101, 221, 90, 219, 182, 214, 182, 124, 144,
90, 235, 138, 49, 166, 109, 173, 125, 24, 141, 70, 103, 107, 3, 2,
24, 0, 232, 3, 104, 88, 107, 59, 90, 235, 202, 188, 13, 74, 169,
242, 120, 60, 190, 3, 80, 35, 162, 62, 17, 125, 122, 222, 211, 47,
41, 229, 49, 231, 252, 153, 115, 238, 56, 231, 175, 191, 33, 149, 82,
229, 225, 112, 216, 75, 215, 62, 10, 33, 14, 215, 138, 243, 65, 110,
12, 183, 8, 50, 79, 28, 173, 138, 180, 214, 182, 0, 92, 0, 120,
43, 20, 10, 87, 206, 185, 137, 49, 230, 158, 136, 234, 0, 186, 140,
177, 102, 28, 199, 31, 27, 1, 166, 200, 82, 138, 108, 16, 81, 207,
57, 183, 5, 160, 150, 7, 46, 23, 96, 138, 204, 62, 73, 32, 39,
28, 224, 63, 102, 126, 140, 136, 152, 115, 46, 202, 28, 218, 137, 162,
104, 59, 143, 107, 175, 12, 212, 90, 87, 146, 36, 233, 76, 223, 57,
34, 234, 1, 56, 55, 198, 220, 46, 243, 199, 201, 21, 152, 29, 194,
0, 158, 24, 99, 55, 140, 177, 75, 0, 47, 240, 24, 230, 107, 105,
102, 148, 116, 133, 16, 71, 211, 115, 179, 35, 72, 41, 117, 242, 103,
112, 27, 71, 46, 130, 219, 24, 210, 7, 151, 23, 210, 235, 35, 153,
76, 38, 251, 0, 14, 240, 61, 231, 174, 227, 56, 126, 159, 183, 167,
88, 44, 14, 162, 40, 106, 166, 95, 247, 94, 146, 36, 187, 62, 247,
244, 78, 8, 81, 93, 230, 223, 42, 165, 44, 113, 206, 79, 215, 97,
10, 133, 66, 161, 80, 232, 31, 247, 5, 5, 40, 133, 239, 38, 126,
142, 87, 0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130,
};
25 changes: 14 additions & 11 deletions lib/tlUI/Resources/Close_96.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@ const std::vector<uint8_t> Close_96_png = {
0, 0, 14, 195, 1, 199, 111, 168, 100, 0, 0, 0, 25, 116, 69,
88, 116, 83, 111, 102, 116, 119, 97, 114, 101, 0, 119, 119, 119, 46,
105, 110, 107, 115, 99, 97, 112, 101, 46, 111, 114, 103, 155, 238, 60,
26, 0, 0, 0, 140, 73, 68, 65, 84, 56, 141, 237, 146, 59, 14,
132, 48, 12, 68, 113, 90, 154, 144, 243, 80, 68, 219, 83, 115, 17,
46, 197, 37, 168, 246, 50, 52, 158, 105, 104, 227, 109, 88, 105, 133,
248, 8, 22, 137, 2, 94, 231, 88, 126, 30, 89, 201, 178, 135, 27,
163, 170, 21, 128, 56, 215, 3, 16, 85, 181, 154, 235, 185, 21, 39,
68, 164, 37, 249, 154, 44, 42, 69, 164, 117, 206, 13, 71, 82, 150,
36, 251, 175, 116, 90, 31, 2, 64, 28, 37, 13, 201, 126, 233, 12,
187, 24, 101, 70, 178, 249, 91, 118, 106, 194, 83, 111, 184, 52, 188,
37, 93, 251, 54, 133, 153, 213, 222, 251, 238, 247, 49, 132, 240, 54,
179, 58, 165, 148, 239, 78, 249, 112, 13, 31, 68, 93, 136, 42, 240,
129, 90, 25, 0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130,
26, 0, 0, 0, 176, 73, 68, 65, 84, 56, 141, 237, 146, 65, 10,
194, 48, 16, 69, 231, 199, 189, 180, 247, 209, 82, 122, 5, 23, 197,
19, 138, 136, 119, 240, 14, 122, 2, 93, 101, 209, 204, 63, 128, 116,
220, 84, 8, 18, 173, 209, 133, 8, 125, 171, 192, 204, 252, 249, 252,
137, 200, 196, 255, 160, 170, 197, 39, 53, 247, 108, 0, 192, 73, 85,
235, 199, 26, 201, 6, 192, 177, 235, 186, 121, 150, 195, 16, 194, 130,
164, 39, 217, 68, 139, 42, 146, 62, 181, 232, 14, 198, 68, 157, 115,
123, 17, 89, 155, 217, 21, 192, 206, 204, 218, 178, 44, 15, 89, 238,
98, 84, 181, 30, 156, 250, 16, 194, 114, 172, 63, 153, 97, 12, 0,
23, 189, 103, 95, 9, 170, 106, 37, 34, 27, 51, 107, 251, 190, 95,
1, 216, 198, 153, 102, 145, 58, 64, 234, 80, 239, 138, 21, 36, 47,
169, 204, 134, 76, 207, 217, 223, 230, 213, 64, 182, 216, 196, 111, 185,
1, 210, 177, 123, 251, 20, 171, 55, 152, 0, 0, 0, 0, 73, 69,
78, 68, 174, 66, 96, 130,
};

0 comments on commit 7c52cee

Please sign in to comment.