[epiphany/wip/exalm/tabs: 26/37] fixup! tmp
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/exalm/tabs: 26/37] fixup! tmp
- Date: Sun, 13 Sep 2020 00:04:33 +0000 (UTC)
commit 59e4c896cb529b8c22d54834108f4af473fb7e6c
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Mon Sep 7 18:44:03 2020 +0500
fixup! tmp
src/ephy-desktop-utils.c | 13 ++--
src/ephy-tab-label.c | 5 --
src/ephy-tab-view.c | 36 ++++++++++-
src/resources/ephy-audio-muted-symbolic.svg | 86 +++++++++++++++++++++++++
src/resources/ephy-audio-playing-symbolic.svg | 1 +
src/resources/ephy-missing-favicon-symbolic.svg | 32 ---------
src/resources/epiphany.gresource.xml | 3 +-
src/resources/themes/_Adwaita-base.scss | 33 ----------
src/resources/themes/elementary.scss | 6 --
9 files changed, 128 insertions(+), 87 deletions(-)
---
diff --git a/src/ephy-desktop-utils.c b/src/ephy-desktop-utils.c
index 008ed4d6c..9af222449 100644
--- a/src/ephy-desktop-utils.c
+++ b/src/ephy-desktop-utils.c
@@ -59,12 +59,11 @@ const char *
ephy_get_fallback_favicon_name (const char *uri,
EphyFaviconType type)
{
- if (uri) {
- if (g_str_has_prefix (uri, "ephy-about:overview") || g_str_has_prefix (uri, "about:overview"))
- return "view-grid-symbolic";
- else if (g_str_has_prefix (uri, "ephy-about:") || g_str_has_prefix (uri, "about:"))
- return "web-browser-symbolic";
- }
+ if (!uri)
+ return NULL;
- return type == EPHY_FAVICON_TYPE_SHOW_MISSING_PLACEHOLDER ? "ephy-missing-favicon-symbolic" : NULL;
+ if (g_str_has_prefix (uri, "ephy-about:overview") || g_str_has_prefix (uri, "about:overview"))
+ return EPHY_FAVICON_TYPE_SHOW_MISSING_PLACEHOLDER ? "view-grid-symbolic" : NULL;
+ else if (g_str_has_prefix (uri, "ephy-about:") || g_str_has_prefix (uri, "about:"))
+ return "web-browser-symbolic";
}
diff --git a/src/ephy-tab-label.c b/src/ephy-tab-label.c
index 2d4b0209e..38cdf9f0b 100644
--- a/src/ephy-tab-label.c
+++ b/src/ephy-tab-label.c
@@ -81,11 +81,6 @@ ephy_tab_label_set_spinning (EphyTabLabel *tab_label,
static void
ephy_tab_label_update_icon (EphyTabLabel *self)
{
- if (!self->has_icon) {
- const char *favicon_name = ephy_get_fallback_favicon_name (self->uri,
EPHY_FAVICON_TYPE_NO_MISSING_PLACEHOLDER);
-
- gtk_image_set_from_icon_name (GTK_IMAGE (self->icon), favicon_name, GTK_ICON_SIZE_MENU);
- }
}
static void
diff --git a/src/ephy-tab-view.c b/src/ephy-tab-view.c
index bdcccc78c..75e32b7d8 100644
--- a/src/ephy-tab-view.c
+++ b/src/ephy-tab-view.c
@@ -20,6 +20,7 @@
#include "ephy-tab-view.h"
+#include "ephy-desktop-utils.h"
#include "ephy-embed-utils.h"
struct _EphyTabView {
@@ -356,6 +357,29 @@ update_title_cb (HdyTabPage *page)
hdy_tab_page_set_title (page, address);
}
+static void
+update_icon_cb (HdyTabPage *page)
+{
+ EphyEmbed *embed = EPHY_EMBED (hdy_tab_page_get_content (page));
+ EphyWebView *view = ephy_embed_get_web_view (embed);
+ g_autoptr (GIcon) icon = G_ICON (ephy_web_view_get_icon (view));
+ const char *uri, *favicon_name;
+
+ if (icon) {
+ hdy_tab_page_set_icon (page, g_steal_pointer (&icon));
+
+ return;
+ }
+
+ uri = webkit_web_view_get_uri (WEBKIT_WEB_VIEW (view));
+ favicon_name = ephy_get_fallback_favicon_name (uri, EPHY_FAVICON_TYPE_NO_MISSING_PLACEHOLDER);
+
+ if (favicon_name)
+ icon = g_themed_icon_new (favicon_name);
+
+ hdy_tab_page_set_icon (page, icon);
+}
+
static void
update_secondary_icon_cb (HdyTabPage *page)
{
@@ -365,9 +389,9 @@ update_secondary_icon_cb (HdyTabPage *page)
if (webkit_web_view_is_playing_audio (WEBKIT_WEB_VIEW (view))) {
if (webkit_web_view_get_is_muted (WEBKIT_WEB_VIEW (view)))
- icon = G_ICON (g_themed_icon_new ("audio-volume-muted-symbolic"));
+ icon = G_ICON (g_themed_icon_new ("ephy-audio-muted-symbolic"));
else
- icon = G_ICON (g_themed_icon_new ("audio-volume-high-symbolic"));
+ icon = G_ICON (g_themed_icon_new ("ephy-audio-playing-symbolic"));
}
hdy_tab_page_set_secondary_icon (page, icon);
@@ -395,7 +419,6 @@ ephy_tab_view_add_tab (EphyTabView *self,
hdy_tab_page_set_secondary_icon_activatable (page, TRUE);
g_object_bind_property (view, "is-loading", page, "loading", G_BINDING_SYNC_CREATE);
- g_object_bind_property (view, "icon", page, "icon", G_BINDING_SYNC_CREATE);
g_signal_connect_object (embed, "notify::title",
G_CALLBACK (update_title_cb), page,
@@ -403,6 +426,12 @@ ephy_tab_view_add_tab (EphyTabView *self,
g_signal_connect_object (view, "notify::display-address",
G_CALLBACK (update_title_cb), page,
G_CONNECT_SWAPPED);
+ g_signal_connect_object (view, "notify::icon",
+ G_CALLBACK (update_icon_cb), page,
+ G_CONNECT_SWAPPED);
+ g_signal_connect_object (view, "notify::uri",
+ G_CALLBACK (update_icon_cb), page,
+ G_CONNECT_SWAPPED);
g_signal_connect_object (view, "notify::is-playing-audio",
G_CALLBACK (update_secondary_icon_cb), page,
G_CONNECT_SWAPPED);
@@ -411,6 +440,7 @@ ephy_tab_view_add_tab (EphyTabView *self,
G_CONNECT_SWAPPED);
update_title_cb (page);
+ update_icon_cb (page);
update_secondary_icon_cb (page);
return hdy_tab_view_get_page_position (self->tab_view, page);
diff --git a/src/resources/ephy-audio-muted-symbolic.svg b/src/resources/ephy-audio-muted-symbolic.svg
new file mode 100644
index 000000000..e838a7b77
--- /dev/null
+++ b/src/resources/ephy-audio-muted-symbolic.svg
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<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"
+ width="15.999999"
+ height="15.999999"
+ viewBox="0 0 4.233333 4.2333332"
+ version="1.1"
+ id="svg59656"
+ inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
+ sodipodi:docname="sound-muted-symbolic.svg">
+ <defs
+ id="defs59650" />
+ <sodipodi:namedview
+ inkscape:snap-midpoints="true"
+ inkscape:snap-smooth-nodes="true"
+ inkscape:snap-intersection-paths="true"
+ inkscape:object-paths="true"
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="4.7332096"
+ inkscape:cx="72.365677"
+ inkscape:cy="-5.9069288"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ inkscape:document-rotation="0"
+ showgrid="true"
+ units="px"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1">
+ <inkscape:grid
+ type="xygrid"
+ id="grid59669"
+ originx="-414.0729"
+ originy="-67.204172" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata59653">
+ <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></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-414.07291,-67.20417)">
+ <g
+ style="fill:#241f31"
+ transform="matrix(0.26458333,0,0,0.26458333,414.07293,67.204165)"
+ fill="#474747"
+ id="g16">
+ <path
+ transform="translate(-7.5590552e-5,1.8897638e-5)"
+ d="M 7.453125 2 L 4.5214844 4.9609375 L 8 8.4394531 L 8 2 L 7.453125 2 z M 11 3 L 11 5 C 11.607
5.789 12 6.76 12 8 C 12 9.241 11.607 10.22 11 11 L 11 11.439453 L 12.287109 12.726562 C 13.34008 11.684021 14
9.952001 14 8 C 14 5.834 13.261 3.98 12 3 L 11 3 z M 2 5 L 2 11 L 4.484375 11 L 7.5253906 14 L 8 14 L 8
10.5625 L 2.4375 5 L 2 5 z M 9 5 L 9 9.4394531 L 10.226562 10.666016 C 10.734406 9.9178051 11 9.0952939 11 8
C 11 6.743 10.688 5.784 10 5 L 9 5 z "
+ style="marker:none;fill:#241f31"
+ id="path10" />
+ </g>
+ <path
+ id="path60"
+ d="m 417.90147,71.336914 0.28098,-0.280987 -3.70443,-3.703902 -0.28072,0.280723 z"
+
style="fill:#241f31;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
/>
+ <g
+ style="fill:#2ec27e"
+ transform="translate(-5.8208332)"
+ id="g72" />
+ </g>
+</svg>
diff --git a/src/resources/ephy-audio-playing-symbolic.svg b/src/resources/ephy-audio-playing-symbolic.svg
new file mode 100644
index 000000000..0a6415750
--- /dev/null
+++ b/src/resources/ephy-audio-playing-symbolic.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><g fill="#474747"><path d="M2
5h2.484l2.97-3H8v12h-.475l-3.04-3H2z" style="marker:none" color="#bebebe" overflow="visible"/><path d="M14
8c0-2.166-.739-4.02-2-5h-1v2c.607.789 1 1.76 1 3 0 1.241-.393 2.22-1 3v2h1c1.223-.995 2-2.873 2-5z"
style="marker:none" color="#000" overflow="visible"/><path d="M11 8c0-1.257-.312-2.216-1-3H9v6h1c.672-.837
1-1.742 1-3z"
style="line-height:normal;-inkscape-font-specification:Sans;text-indent:0;text-align:start;text-decoration-line:none;text-transform:none;marker:none"
color="#000" font-weight="400" font-family="Sans" overflow="visible"/></g></svg>
\ No newline at end of file
diff --git a/src/resources/epiphany.gresource.xml b/src/resources/epiphany.gresource.xml
index b297f3e34..fc6b99ff1 100644
--- a/src/resources/epiphany.gresource.xml
+++ b/src/resources/epiphany.gresource.xml
@@ -46,8 +46,9 @@
<file compressed="true" alias="scalable/actions/ephy-download-symbolic.svg"
preprocess="xml-stripblanks">ephy-download-symbolic.svg</file>
<file compressed="true"
alias="scalable/actions/ephy-bookmarks-symbolic.svg">ephy-bookmarks-symbolic.svg</file>
<file compressed="true"
alias="scalable/actions/ephy-bookmark-tag-symbolic.svg">ephy-bookmark-tag-symbolic.svg</file>
- <file compressed="true"
alias="scalable/actions/ephy-missing-favicon-symbolic.svg">ephy-missing-favicon-symbolic.svg</file>
<file compressed="true"
alias="scalable/actions/ephy-reader-mode-symbolic.svg">ephy-reader-mode-symbolic.svg</file>
+ <file compressed="true"
alias="scalable/status/ephy-audio-muted-symbolic.svg">ephy-audio-muted-symbolic.svg</file>
+ <file compressed="true"
alias="scalable/status/ephy-audio-playing-symbolic.svg">ephy-audio-playing-symbolic.svg</file>
<file compressed="true"
alias="scalable/status/ephy-tab-counter-symbolic.svg">ephy-tab-counter-symbolic.svg</file>
<file compressed="true"
alias="scalable/status/ephy-tab-overflow-symbolic.svg">ephy-tab-overflow-symbolic.svg</file>
</gresource>
diff --git a/src/resources/themes/_Adwaita-base.scss b/src/resources/themes/_Adwaita-base.scss
index 01a51b9e8..66c62989e 100644
--- a/src/resources/themes/_Adwaita-base.scss
+++ b/src/resources/themes/_Adwaita-base.scss
@@ -85,39 +85,6 @@ $close_button_fg_color: if($variant == 'light', lighten($fg_color, 10%), darken(
animation-iteration-count: 3;
}
-// Pinned tabs
-.main-notebook {
- tab {
- min-width: 16px;
- }
-
- header {
- &.top,
- &.bottom {
- tab {
- border-style: none solid;
- }
- }
-
- &.left,
- &.right {
- tab {
- border-style: solid none;
- }
- }
- }
-}
-
-.tab-attention {
- $_dot_color: if($variant=='light', $selected_bg_color,
- lighten($selected_bg_color,15%));
- background-image: -gtk-gradient(radial,
- center center, 0,
- center center, 0.5,
- to($_dot_color),
- to(transparent));
-}
-
#title-box-container {
color: gtkalpha(themecolor(theme_fg_color), 0.2);
diff --git a/src/resources/themes/elementary.scss b/src/resources/themes/elementary.scss
index 26459a87c..04ca05682 100644
--- a/src/resources/themes/elementary.scss
+++ b/src/resources/themes/elementary.scss
@@ -56,12 +56,6 @@ $variant: 'light';
}
}
-.main-notebook {
- tab {
- min-width: 30px;
- }
-}
-
// FIXME: this should be in libdazzle
dzlsuggestionpopover > revealer > box {
// Fix background and shadow
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]