Add icons for header

This commit is contained in:
daleclack 2024-03-28 21:10:47 +08:00
parent e37d057789
commit 4501c1903b
4 changed files with 236 additions and 2 deletions

View File

@ -128,6 +128,8 @@ set(RESOURCE_LIST
icons/scalable/status/rectangle-dark.svg icons/scalable/status/rectangle-dark.svg
icons/scalable/status/calcapp.svg icons/scalable/status/calcapp.svg
icons/scalable/status/calcapp_running.svg icons/scalable/status/calcapp_running.svg
icons/scalable/status/header_close.svg
icons/scalable/status/header_minimize.svg
icons/scalable/status/mines_app.svg icons/scalable/status/mines_app.svg
icons/scalable/status/mines_app_running.svg icons/scalable/status/mines_app_running.svg
icons/scalable/status/media-app.svg icons/scalable/status/media-app.svg

View File

@ -0,0 +1,95 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
id="svg7384"
version="1.1"
height="16"
width="16"
inkscape:version="0.48.5 r10040"
sodipodi:docname="window-close-symbolic.svg">
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1366"
inkscape:window-height="723"
id="namedview15"
showgrid="true"
inkscape:zoom="14.75"
inkscape:cx="14.600061"
inkscape:cy="10.005214"
inkscape:window-x="0"
inkscape:window-y="23"
inkscape:window-maximized="1"
inkscape:current-layer="svg7384">
<inkscape:grid
type="xygrid"
id="grid2992" />
</sodipodi:namedview>
<title
id="title9167">Gnome Symbolic Icon Theme</title>
<metadata
id="metadata90">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Gnome Symbolic Icon Theme</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs7386" />
<g
transform="translate(-60,-518)"
id="layer9"
style="display:inline" />
<g
transform="translate(-60,-518)"
id="layer10" />
<g
transform="translate(-60,-518)"
id="layer11" />
<g
id="g2996"
transform="matrix(0.75,0,0,0.75,2,2.0546875)">
<g
id="layer12"
transform="translate(-60,-518)">
<g
style="display:inline"
id="layer4-4-1"
transform="translate(19,-242)">
<path
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#bebebe;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.78124988;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new;font-family:Andale Mono;-inkscape-font-specification:Andale Mono"
id="path10839-9"
d="m 45,764 1,0 c 0.01037,-1.2e-4 0.02079,-4.6e-4 0.03125,0 0.254951,0.0112 0.50987,0.12858 0.6875,0.3125 L 49,766.59375 51.3125,764.3125 C 51.578125,764.082 51.759172,764.007 52,764 l 1,0 0,1 c 0,0.28647 -0.03434,0.55065 -0.25,0.75 l -2.28125,2.28125 2.25,2.25 C 52.906938,770.46942 52.999992,770.7347 53,771 l 0,1 -1,0 c -0.265301,-10e-6 -0.530586,-0.0931 -0.71875,-0.28125 L 49,769.4375 46.71875,771.71875 C 46.530586,771.90694 46.26529,772 46,772 l -1,0 0,-1 c -3e-6,-0.26529 0.09306,-0.53058 0.28125,-0.71875 l 2.28125,-2.25 L 45.28125,765.75 C 45.070508,765.55537 44.97809,765.28075 45,765 l 0,-1 z"
inkscape:connector-curvature="0" />
</g>
</g>
</g>
<g
transform="translate(-60,-518)"
id="layer13" />
<g
transform="translate(-60,-518)"
id="layer14" />
<g
transform="translate(-60,-518)"
id="layer15" />
</svg>

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="window-minimize-symbolic.svg"
height="16"
id="svg7384"
inkscape:version="0.48.5 r10040"
version="1.1"
width="16">
<metadata
id="metadata90">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Gnome Symbolic Icon Theme</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
inkscape:bbox-nodes="true"
inkscape:bbox-paths="true"
bordercolor="#666666"
borderopacity="1"
inkscape:current-layer="layer12"
inkscape:cx="16.049735"
inkscape:cy="7.9197873"
gridtolerance="10"
inkscape:guide-bbox="true"
guidetolerance="10"
id="namedview88"
inkscape:object-nodes="false"
inkscape:object-paths="false"
objecttolerance="10"
pagecolor="#3a3b39"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
showborder="true"
showgrid="true"
showguides="true"
inkscape:snap-bbox="true"
inkscape:snap-bbox-midpoints="false"
inkscape:snap-global="true"
inkscape:snap-grids="true"
inkscape:snap-nodes="true"
inkscape:snap-others="false"
inkscape:snap-to-guides="true"
inkscape:window-height="723"
inkscape:window-maximized="1"
inkscape:window-width="1366"
inkscape:window-x="0"
inkscape:window-y="23"
inkscape:zoom="22.627417">
<inkscape:grid
empspacing="2"
enabled="true"
id="grid4866"
originx="160px"
originy="750px"
snapvisiblegridlinesonly="true"
spacingx="1px"
spacingy="1px"
type="xygrid"
visible="true" />
</sodipodi:namedview>
<title
id="title9167">Gnome Symbolic Icon Theme</title>
<defs
id="defs7386" />
<g
inkscape:groupmode="layer"
id="layer9"
inkscape:label="status"
style="display:inline"
transform="translate(-81.0002,-967)" />
<g
inkscape:groupmode="layer"
id="layer10"
inkscape:label="devices"
transform="translate(-81.0002,-967)" />
<g
inkscape:groupmode="layer"
id="layer11"
inkscape:label="apps"
transform="translate(-81.0002,-967)" />
<g
inkscape:groupmode="layer"
id="layer13"
inkscape:label="places"
transform="translate(-81.0002,-967)" />
<g
inkscape:groupmode="layer"
id="layer14"
inkscape:label="mimetypes"
transform="translate(-81.0002,-967)" />
<g
inkscape:groupmode="layer"
id="layer15"
inkscape:label="emblems"
style="display:inline"
transform="translate(-81.0002,-967)" />
<g
inkscape:groupmode="layer"
id="g71291"
inkscape:label="emotes"
style="display:inline"
transform="translate(-81.0002,-967)" />
<g
inkscape:groupmode="layer"
id="g4953"
inkscape:label="categories"
style="display:inline"
transform="translate(-81.0002,-967)" />
<g
inkscape:groupmode="layer"
id="layer12"
inkscape:label="actions"
style="display:inline"
transform="translate(-81.0002,-967)">
<path
inkscape:connector-curvature="0"
d="m 86.0002,974 0,2 6,0 0,-2 z"
id="rect9057"
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans"
sodipodi:nodetypes="ccccc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -38,14 +38,14 @@ static void my_titlebar_init(MyTitleBar *self)
// Add a close button // Add a close button
// self->btn_close = gtk_button_new_with_label("\u00d7"); // self->btn_close = gtk_button_new_with_label("\u00d7");
self->btn_close = gtk_button_new_from_icon_name("window-close-symbolic"); self->btn_close = gtk_button_new_from_icon_name("header_close");
gtk_widget_set_css_classes(self->btn_close, NULL); gtk_widget_set_css_classes(self->btn_close, NULL);
gtk_widget_add_css_class(self->btn_close, "ctrl_btn"); gtk_widget_add_css_class(self->btn_close, "ctrl_btn");
gtk_widget_add_css_class(self->btn_close, "close"); gtk_widget_add_css_class(self->btn_close, "close");
gtk_header_bar_pack_start(GTK_HEADER_BAR(self->header), self->btn_close); gtk_header_bar_pack_start(GTK_HEADER_BAR(self->header), self->btn_close);
// Add a minimize button // Add a minimize button
self->btn_mini = gtk_button_new_from_icon_name("window-minimize-symbolic"); self->btn_mini = gtk_button_new_from_icon_name("header_minimize");
gtk_widget_set_css_classes(self->btn_mini, NULL); gtk_widget_set_css_classes(self->btn_mini, NULL);
gtk_widget_add_css_class(self->btn_mini, "ctrl_btn"); gtk_widget_add_css_class(self->btn_mini, "ctrl_btn");
gtk_header_bar_pack_start(GTK_HEADER_BAR(self->header), self->btn_mini); gtk_header_bar_pack_start(GTK_HEADER_BAR(self->header), self->btn_mini);