1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-24 12:46:35 +01:00

Final fix for page background with dark themes.

Background of html element is now by default set to
white.
Closes #602
This commit is contained in:
nowrep 2013-01-25 21:14:37 +01:00
parent 3f616b330d
commit df6417af4a
3 changed files with 3 additions and 1 deletions

View File

@ -873,7 +873,7 @@ QUrl MainApplication::userStyleSheet(const QString &filePath) const
{ {
// Set default white background for all sites // Set default white background for all sites
// Fixes issue with dark themes when sites don't set background // Fixes issue with dark themes when sites don't set background
QString userStyle /*= "html{background-color:white;}"*/; QString userStyle = "html{background-color:white;}";
userStyle += AdBlockManager::instance()->elementHidingRules() + "{ display:none !important;}"; userStyle += AdBlockManager::instance()->elementHidingRules() + "{ display:none !important;}";
QFile file(filePath); QFile file(filePath);

View File

@ -3,6 +3,7 @@
<title>%TITLE%</title> <title>%TITLE%</title>
<link rel="icon" href="%FAVICON%" type="image/x-icon" /> <link rel="icon" href="%FAVICON%" type="image/x-icon" />
<style> <style>
html {background: #eeeeee;}
body {background: #eeeeee;} body {background: #eeeeee;}
#box {background: white;border: 1px solid lightgrey;max-width: 300px;height: 80%;overflow:auto;padding: 25px;padding-bottom: 10px;border-radius: 15px;text-align: center;vertical-align: middle;margin: auto;direction: %DIRECTION%;} #box {background: white;border: 1px solid lightgrey;max-width: 300px;height: 80%;overflow:auto;padding: 25px;padding-bottom: 10px;border-radius: 15px;text-align: center;vertical-align: middle;margin: auto;direction: %DIRECTION%;}
h2 {font-size: 100%;font-weight: bold; border-bottom: 1px solid #f4f4f4; margin-bottom: 0px;} h2 {font-size: 100%;font-weight: bold; border-bottom: 1px solid #f4f4f4; margin-bottom: 0px;}

View File

@ -3,6 +3,7 @@
<title>%SITE-TITLE%</title> <title>%SITE-TITLE%</title>
<link rel="icon" href="%FAVICON%" type="image/x-icon" /> <link rel="icon" href="%FAVICON%" type="image/x-icon" />
<style type="text/css" media="screen"> <style type="text/css" media="screen">
html {background: #eeeeee;}
body {background: #eeeeee url("%IMG_BACKGROUND%") no-repeat center center;background-size: %B_SIZE%;font: 13px/22px "Helvetica Neue", Helvetica, Arial, sans-serif;color: #525c66;direction: %DIRECTION%;} body {background: #eeeeee url("%IMG_BACKGROUND%") no-repeat center center;background-size: %B_SIZE%;font: 13px/22px "Helvetica Neue", Helvetica, Arial, sans-serif;color: #525c66;direction: %DIRECTION%;}
body * {-webkit-user-select: none;font-size: 100%;line-height: 1.6;margin: 0px;} body * {-webkit-user-select: none;font-size: 100%;line-height: 1.6;margin: 0px;}
.add {position: absolute;%RIGHT_STR%:10px;top:10px;width: 24px;height: 24px;background: url(%IMG_PLUS%); cursor: pointer;} .add {position: absolute;%RIGHT_STR%:10px;top:10px;width: 24px;height: 24px;background: url(%IMG_PLUS%); cursor: pointer;}