110 lines
5.8 KiB
Diff
110 lines
5.8 KiB
Diff
From dacd31dd59799269e06334ee1e238c8c0d4d2b47 Mon Sep 17 00:00:00 2001
|
||
From: yangfeng <yangfeng@kylinsec.com.cn>
|
||
Date: Wed, 6 Mar 2024 11:58:27 +0800
|
||
Subject: [PATCH 1009/1014] fix(tasklist-app-widget):Fixed an issue where
|
||
taskbar page-turning ICONS cover each other
|
||
MIME-Version: 1.0
|
||
Content-Type: text/plain; charset=UTF-8
|
||
Content-Transfer-Encoding: 8bit
|
||
|
||
- 修复任务栏翻页图标互相遮盖问题
|
||
|
||
Related #19588
|
||
---
|
||
icons/kiran-tasklist-next-symbolic.svg | 2 +-
|
||
icons/kiran-tasklist-previous-symbolic.svg | 47 +++++-----------------
|
||
src/tasklist/tasklist-applet-widget.cpp | 13 ++++--
|
||
3 files changed, 20 insertions(+), 42 deletions(-)
|
||
|
||
diff --git a/icons/kiran-tasklist-next-symbolic.svg b/icons/kiran-tasklist-next-symbolic.svg
|
||
index 78c1827..97ecca5 100644
|
||
--- a/icons/kiran-tasklist-next-symbolic.svg
|
||
+++ b/icons/kiran-tasklist-next-symbolic.svg
|
||
@@ -35,5 +35,5 @@
|
||
}
|
||
</style>
|
||
</defs>
|
||
- <path id="形状_1_拷贝" data-name="形状 1 拷贝" class="cls-1" d="M1556,1063l-5,4.46-5-4.46v1.54l5,4.46,5-4.46V1063Z" transform="translate(-1543 -1058)"/>
|
||
+ <path id="icon_arrow" class="cls-1" d="M5831,327.994l8,8.122,8-8.122v1.889l-8,8.122-8-8.122v-1.889Z" transform="translate(-5831 -325)"/>
|
||
</svg>
|
||
diff --git a/icons/kiran-tasklist-previous-symbolic.svg b/icons/kiran-tasklist-previous-symbolic.svg
|
||
index c8cc991..cd4501f 100644
|
||
--- a/icons/kiran-tasklist-previous-symbolic.svg
|
||
+++ b/icons/kiran-tasklist-previous-symbolic.svg
|
||
@@ -1,39 +1,10 @@
|
||
-<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||
- <metadata><?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
|
||
-<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c138 79.159824, 2016/09/14-01:09:01 ">
|
||
- <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
||
- <rdf:Description rdf:about=""/>
|
||
- </rdf:RDF>
|
||
-</x:xmpmeta>
|
||
-
|
||
-
|
||
-
|
||
-
|
||
-
|
||
-
|
||
-
|
||
-
|
||
-
|
||
-
|
||
-
|
||
-
|
||
-
|
||
-
|
||
-
|
||
-
|
||
-
|
||
-
|
||
-
|
||
-
|
||
-
|
||
-<?xpacket end="w"?></metadata>
|
||
-<defs>
|
||
- <style>
|
||
- .cls-1 {
|
||
- fill: #fff;
|
||
- fill-rule: evenodd;
|
||
- }
|
||
- </style>
|
||
- </defs>
|
||
- <path id="形状_1" data-name="形状 1" class="cls-1" d="M1556,1050l-5-4.46-5,4.46v-1.54l5-4.46,5,4.46V1050Z" transform="translate(-1543 -1039)"/>
|
||
+<?xml version="1.0" encoding="utf-8"?>
|
||
+<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||
+<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||
+ viewBox="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve">
|
||
+<style type="text/css">
|
||
+ .st0{fill:#FFFFFF;}
|
||
+</style>
|
||
+<path id="icon_arrow" class="st0" d="M0,11.1L8,3l8,8.1V13L8,4.9L0,13L0,11.1z"/>
|
||
+<path id="icon_arrow_1_" class="st0" d="M16,13L8,4.9L0,13l0-1.9L8,3l8,8.1V13z"/>
|
||
</svg>
|
||
diff --git a/src/tasklist/tasklist-applet-widget.cpp b/src/tasklist/tasklist-applet-widget.cpp
|
||
index dc20b69..1601920 100644
|
||
--- a/src/tasklist/tasklist-applet-widget.cpp
|
||
+++ b/src/tasklist/tasklist-applet-widget.cpp
|
||
@@ -150,9 +150,16 @@ Gtk::Button *TasklistAppletWidget::create_paging_button(const std::string &icon_
|
||
{
|
||
auto button = Gtk::make_managed<TasklistPagingButton>(applet);
|
||
|
||
- button->set_size_request(16, 16);
|
||
- // button->set_icon_image(icon_resource, 16);
|
||
- button->set_image_from_icon_name(icon_name, Gtk::ICON_SIZE_BUTTON);
|
||
+ auto scale = Gdk::Window::get_default_root_window()->get_scale_factor();
|
||
+ auto icon_info = Gtk::IconTheme::get_default()->lookup_icon(icon_name, 6, scale);
|
||
+ auto style_context = Gtk::StyleContext::create();
|
||
+ bool was_symbolic = true;
|
||
+ auto pixbuf = icon_info.load_symbolic(style_context, was_symbolic);
|
||
+
|
||
+ auto image = Gtk::make_managed<Gtk::Image>();
|
||
+ image->set(pixbuf);
|
||
+ button->set_image(*image);
|
||
+ button->set_size_request(30, -1);
|
||
button->set_tooltip_text(tooltip_text);
|
||
|
||
return button;
|
||
--
|
||
2.27.0
|
||
|