Skip to content

Commit

Permalink
Final fix for page background with dark themes.
Browse files Browse the repository at this point in the history
Background of html element is now by default set to
white.
Closes QupZilla#602
  • Loading branch information
nowrep committed Jan 25, 2013
1 parent 3f616b3 commit df6417a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/app/mainapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ QUrl MainApplication::userStyleSheet(const QString &filePath) const
{
// Set default white background for all sites
// 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;}";

QFile file(filePath);
Expand Down
1 change: 1 addition & 0 deletions src/lib/data/html/adblockPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<title>%TITLE%</title>
<link rel="icon" href="%FAVICON%" type="image/x-icon" />
<style>
html {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%;}
h2 {font-size: 100%;font-weight: bold; border-bottom: 1px solid #f4f4f4; margin-bottom: 0px;}
Expand Down
1 change: 1 addition & 0 deletions src/lib/data/html/speeddial.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<title>%SITE-TITLE%</title>
<link rel="icon" href="%FAVICON%" type="image/x-icon" />
<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 * {-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;}
Expand Down

0 comments on commit df6417a

Please sign in to comment.