From 1a3bae332942248823b112d36181b061f6e39bb0 Mon Sep 17 00:00:00 2001 From: shenleban tongying Date: Thu, 20 Apr 2023 05:49:05 -0400 Subject: [PATCH] cleanup(css): remove 1x1 pixel hack When the code was written, there is no way to specify img's src, so the 1x1 blank.png is a dummy img to be replaced. --- icons/blank.png | Bin 293 -> 0 bytes resources.qrc | 1 - src/article_maker.cc | 2 +- src/stylesheets/article-style-st-babylon.css | 8 ++++---- src/stylesheets/article-style-st-classic.css | 4 ++-- src/stylesheets/article-style-st-lingoes-blue.css | 8 ++++---- src/stylesheets/article-style-st-lingoes.css | 8 ++++---- src/stylesheets/article-style-st-modern.css | 8 ++++---- src/stylesheets/article-style.css | 4 ++-- 9 files changed, 21 insertions(+), 22 deletions(-) delete mode 100644 icons/blank.png diff --git a/icons/blank.png b/icons/blank.png deleted file mode 100644 index d0d70b876a31f4a3821e53e18a0f6c644f2c2136..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 293 zcmeAS@N?(olHy`uVBq!ia0vp^j35jm7|ip2ssJgLbVpxD28NCO++a1|A879JYD@<);T3K0RY~% BMfLyy diff --git a/resources.qrc b/resources.qrc index 71aea13f..afd12cd0 100644 --- a/resources.qrc +++ b/resources.qrc @@ -31,7 +31,6 @@ icons/icon32_lingoes.png icons/mdict.png icons/downarrow.png - icons/blank.png icons/expand_article_hovered.png icons/expand_article.png icons/collapse_article_hovered.png diff --git a/src/article_maker.cc b/src/article_maker.cc index 19653b1e..57ef22d5 100644 --- a/src/article_maker.cc +++ b/src/article_maker.cc @@ -667,7 +667,7 @@ void ArticleRequest::bodyFinished() %4 %5 - + )" ) .arg( dictId.c_str(), collapse ? R"(style="cursor:pointer;")" : "", diff --git a/src/stylesheets/article-style-st-babylon.css b/src/stylesheets/article-style-st-babylon.css index b09425f6..3dd0c05d 100644 --- a/src/stylesheets/article-style-st-babylon.css +++ b/src/stylesheets/article-style-st-babylon.css @@ -73,19 +73,19 @@ h3 { } .gdexpandicon { - background-image: url('qrc:///icons/expand_article.png'); + content:url('qrc:///icons/expand_article.png'); } .gdexpandicon:hover { - background-image: url('qrc:///icons/expand_article_hovered.png'); + content:url('qrc:///icons/expand_article_hovered.png'); } .gdcollapseicon { - background-image: url('qrc:///icons/collapse_article.png'); + content:url('qrc:///icons/collapse_article.png'); } .gdcollapseicon:hover { - background-image: url('qrc:///icons/collapse_article_hovered.png'); + content:url('qrc:///icons/collapse_article_hovered.png'); } .bglpos { color: black; font-weight: bold; font-size: 11px; background: #F0EDED; display: inline; } diff --git a/src/stylesheets/article-style-st-classic.css b/src/stylesheets/article-style-st-classic.css index ed885a97..53f6ac8c 100644 --- a/src/stylesheets/article-style-st-classic.css +++ b/src/stylesheets/article-style-st-classic.css @@ -2909,7 +2909,7 @@ in bg url to hide it from iemac */ width:16px; height:16px; vertical-align: text-bottom; - background-image:url('qrc:///icons/old-arrow.png'); + content:url('qrc:///icons/old-arrow.png'); } .gdcollapseicon { @@ -2917,7 +2917,7 @@ in bg url to hide it from iemac */ width:16px; height:16px; vertical-align: text-bottom; - background-image:url('qrc:///icons/old-downarrow.png'); + content:url('qrc:///icons/old-downarrow.png'); } /********** Slob dictionaries ***********/ diff --git a/src/stylesheets/article-style-st-lingoes-blue.css b/src/stylesheets/article-style-st-lingoes-blue.css index 6789aaee..0246604f 100644 --- a/src/stylesheets/article-style-st-lingoes-blue.css +++ b/src/stylesheets/article-style-st-lingoes-blue.css @@ -107,19 +107,19 @@ a:hover { } .gdexpandicon { - background-image: url('qrc:///icons/expand_article.png'); + content:url('qrc:///icons/expand_article.png'); } .gdexpandicon:hover { - background-image: url('qrc:///icons/expand_article_hovered.png'); + content:url('qrc:///icons/expand_article_hovered.png'); } .gdcollapseicon { - background-image: url('qrc:///icons/collapse_article.png'); + content:url('qrc:///icons/collapse_article.png'); } .gdcollapseicon:hover { - background-image: url('qrc:///icons/collapse_article_hovered.png'); + content:url('qrc:///icons/collapse_article_hovered.png'); } .gdarticleseparator { diff --git a/src/stylesheets/article-style-st-lingoes.css b/src/stylesheets/article-style-st-lingoes.css index 2f7ab6ca..d3facc54 100644 --- a/src/stylesheets/article-style-st-lingoes.css +++ b/src/stylesheets/article-style-st-lingoes.css @@ -78,19 +78,19 @@ body .gdexpandicon { - background-image: url('qrc:///icons/expand_article.png'); + content:url('qrc:///icons/expand_article.png'); } .gdexpandicon:hover { - background-image: url('qrc:///icons/expand_article_hovered.png'); + content:url('qrc:///icons/expand_article_hovered.png'); } .gdcollapseicon { - background-image: url('qrc:///icons/collapse_article.png'); + content:url('qrc:///icons/collapse_article.png'); } .gdcollapseicon:hover { - background-image: url('qrc:///icons/collapse_article_hovered.png'); + content:url('qrc:///icons/collapse_article_hovered.png'); } .gddictnamebodyseparator diff --git a/src/stylesheets/article-style-st-modern.css b/src/stylesheets/article-style-st-modern.css index f64c73e8..678fdb6b 100644 --- a/src/stylesheets/article-style-st-modern.css +++ b/src/stylesheets/article-style-st-modern.css @@ -137,19 +137,19 @@ a:hover } .gdexpandicon { - background-image: url('qrc:///icons/expand_article.png'); + content:url('qrc:///icons/expand_article.png'); } .gdexpandicon:hover { - background-image: url('qrc:///icons/expand_article_hovered.png'); + content:url('qrc:///icons/expand_article_hovered.png'); } .gdcollapseicon { - background-image: url('qrc:///icons/collapse_article.png'); + content:url('qrc:///icons/collapse_article.png'); } .gdcollapseicon:hover { - background-image: url('qrc:///icons/collapse_article_hovered.png'); + content:url('qrc:///icons/collapse_article_hovered.png'); } /* The first headword in a (possibly) multi-headword DSL article */ diff --git a/src/stylesheets/article-style.css b/src/stylesheets/article-style.css index 3f27f2d8..e3b054c5 100644 --- a/src/stylesheets/article-style.css +++ b/src/stylesheets/article-style.css @@ -2935,7 +2935,7 @@ in bg url to hide it from iemac */ height:16px; vertical-align: text-bottom; background-size: contain; - background-image:url('qrc://localhost/icons/arrow.png'); + content:url('qrc://localhost/icons/arrow.png'); } .gdcollapseicon { @@ -2944,7 +2944,7 @@ in bg url to hide it from iemac */ height:16px; vertical-align: text-bottom; background-size: contain; - background-image:url('qrc://localhost/icons/downarrow.png'); + content:url('qrc://localhost/icons/downarrow.png'); } /********** Slob dictionaries ***********/