mate-notification-daemon/0002-fix-UI-improve-css-style-of-notification-window-725faa6b.patch
2022-08-04 10:31:11 +08:00

121 lines
3.2 KiB
Diff

From 725faa6b7345e364dd46b80b8dd1ffdc96ae3870 Mon Sep 17 00:00:00 2001
From: yuanxing <yuanxing@kylinos.com.cn>
Date: Fri, 22 Jan 2021 17:12:46 +0800
Subject: [PATCH 2/9] fix(UI):improve css style of notification window
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 完善消息框界面
---
src/themes/kiran/data/kiran.css | 23 ++++++++++++++++++-----
src/themes/kiran/kiran.c | 9 +++++----
2 files changed, 23 insertions(+), 9 deletions(-)
diff --git a/src/themes/kiran/data/kiran.css b/src/themes/kiran/data/kiran.css
index 2f9123e..0e00f1c 100644
--- a/src/themes/kiran/data/kiran.css
+++ b/src/themes/kiran/data/kiran.css
@@ -18,11 +18,12 @@
#actions_label
{
color: #3197de;
- font-size: 12px;
- font-family: "PingFang SC Medium";
+ font-size: 11px;
+ font-family: "Noto Sans CJK SC regular";
+ padding: 0px;
+ text-shadow: none;
}
-
/*********************Button****************************/
#actions_button,#actions_hbox
@@ -30,6 +31,7 @@
padding:0px;
box-shadow:none;
margin:0px;
+ border: none;
}
#actions_button:hover
@@ -73,7 +75,6 @@
#main_hbox
{
- /* background-color: yellow; */
margin-right: 14px;
margin-bottom: 12px;
}
@@ -87,5 +88,17 @@
#text_vbox ,#action_vbox
{
- margin-top: 16px;
+ margin-top: 12px;
+}
+
+
+#action_vbox
+{
+ border: none;
+}
+
+
+#actions_box
+{
+ margin-right: 2px;
}
diff --git a/src/themes/kiran/kiran.c b/src/themes/kiran/kiran.c
index 9181e20..a99af72 100644
--- a/src/themes/kiran/kiran.c
+++ b/src/themes/kiran/kiran.c
@@ -93,7 +93,7 @@ void set_notification_hints(GtkWindow *nw, GVariant *hints);
void notification_tick(GtkWindow *nw, glong remaining);
#define STRIPE_WIDTH 32
-#define WIDTH 270
+#define WIDTH 380
#define IMAGE_SIZE 32
#define IMAGE_PADDING 10
#define SPACER_LEFT 30
@@ -160,7 +160,7 @@ fill_background(GtkWidget *widget, WindowData *windata, cairo_t *cr)
cairo_pattern_destroy (pattern);
nodoka_rounded_rectangle (cr, 0, 0, windata->width,
- windata->height, 6);
+ windata->height, 8);
cairo_fill (cr);
}
@@ -555,6 +555,7 @@ create_notification(UrlClickedCb url_clicked)
set_css(windata->win);
gtk_widget_set_name(windata->win , "notification_window");
+ gtk_widget_set_size_request(windata->win , WIDTH,70);
windata->rtl = gtk_widget_get_default_direction();
windata->composited = FALSE;
screen = gtk_window_get_screen(GTK_WINDOW(win));
@@ -598,7 +599,7 @@ create_notification(UrlClickedCb url_clicked)
gtk_widget_set_halign (windata->main_hbox, GTK_ALIGN_START);
gtk_widget_set_valign (windata->main_hbox, GTK_ALIGN_START);
gtk_widget_show (windata->main_hbox);
- gtk_box_pack_start (GTK_BOX(main_vbox), windata->main_hbox, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX(main_vbox), windata->main_hbox, FALSE, TRUE, 0);
/* The icon goes at the left */
windata->iconbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
@@ -726,7 +727,7 @@ set_notification_text(GtkWindow *nw, const char *summary, const char *body)
gtk_widget_set_size_request(
((body != NULL && *body != '\0')
? windata->body_label : windata->summary_label),
- WIDTH - (IMAGE_SIZE + IMAGE_PADDING) - 10,
+ WIDTH - (IMAGE_SIZE + IMAGE_PADDING) - 60,
-1);
}
--
2.27.0