1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 17:52:10 +02:00

Merge branch 'master' of git://github.com/srazi/qupzilla

This commit is contained in:
nowrep 2012-08-19 19:41:16 +02:00
commit fe0e327089
10 changed files with 68 additions and 40 deletions

View File

@ -5,14 +5,14 @@
<style>
html {background: #eeeeee;font: 13px/22px "Helvetica Neue", Helvetica, Arial, sans-serif;color: #525c66;}
html * {font-size: 100%;line-height: 1.6;}
#box {max-width: 650px;overflow:auto;margin: 25px auto 10px auto;padding: 10px 40px;border-width: 20px;-webkit-border-image: url(%BOX-BORDER%) 25;text-align: left;}
#box {max-width: 650px;overflow:auto;margin: 25px auto 10px auto;padding: 10px 40px;border-width: 20px;-webkit-border-image: url(%BOX-BORDER%) 25;text-align: %LEFT_STR%;}
h1 {color: #1a4ba4;font-size: 160%;margin-bottom: 0px;}
h2 {margin: 5px 0px;font-size: 100%;color: #525c66;font-weight: bold;}
dl {margin-top: 0px;}
dt {display: block;float: left;min-width: 24%;margin: 0 0 0.3em 1%}
dt {display: block;float: %LEFT_STR%;min-width: 24%;margin: 0 0 0.3em 1%}
dd {color: black;margin: 0 0 0.3em 28%;}
p {margin-left: 1%;}
.about-img {float: right;margin-top: 15px;margin-right: -25px;}
p {margin-%LEFT_STR%: 1%;}
.about-img {float: %RIGHT_STR%;margin-top: 15px;margin-%RIGHT_STR%: -25px;}
</style>
</head>
<body>

View File

@ -4,7 +4,7 @@
<link rel="icon" href="%FAVICON%" type="image/x-icon" />
<style>
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;}
#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;}
</style>
</head>

View File

@ -5,19 +5,19 @@
<style>
html {background: #eeeeee;font: 13px/22px "Helvetica Neue", Helvetica, Arial, sans-serif;color: #525c66;}
html * {font-size: 100%;line-height: 1.6;}
#box {max-width: 650px;overflow:auto;margin: 25px auto 10px auto;padding: 10px 40px;border-width: 20px;-webkit-border-image: url(%BOX-BORDER%) 25;text-align: left;}
#box {max-width: 650px;overflow:auto;margin: 25px auto 10px auto;padding: 10px 40px;border-width: 20px;-webkit-border-image: url(%BOX-BORDER%) 25;text-align: %LEFT_STR%;direction: %DIRECTION%;}
h1 {color: #1a4ba4;font-size: 160%;margin-bottom: 0px;}
h2 {margin: 5px 0px;font-size: 100%;color: #525c66;font-weight: bold;}
dl {margin-top: 0px;}
dt {display: block;float: left;min-width: 24%;margin: 0 0 0.3em 1%}
dt {display: block;float: %LEFT_STR%;min-width: 24%;margin: 0 0 0.3em 1%}
dd {color: black;margin: 0 0 0.3em 28%;}
p {margin-left: 1%;}
.about-img {float: right;margin-top: 15px;margin-right: -25px;}
p {margin-%LEFT_STR%: 1%;}
.about-img {float: %RIGHT_STR%;margin-top: 15px;margin-%RIGHT_STR%: -25px;}
table.tbl {width: 100%;margin: 15px 0;border-radius: 4px;padding: 0px;border: 2px solid #aaa;border-collapse: separate;}
.tbl th{border-radius: 2px;border: 1px solid #aaa;padding: 1px 3px;background: #eee;font-style:italic;}
.tbl th[colspan="2"] {text-align: center;background: #ddd;font-style:normal;}
.tbl td{border-radius: 2px;border: 1px solid #aaa;text-align: center;padding:1px 3px;}
.tbl td:first-child{background: #eee;text-align: left;padding:1px 3px 1px 5px;}
.tbl td:first-child{background: #eee;text-align: %LEFT_STR%;padding:1px 3px 1px 5px;}
.no-available-plugins{background: white !important; text-align: center !important;}
.tbl td:nth-of-type(2){color: black;max-width: 400px;max-height: 50px;overflow:auto;}
</style>

View File

@ -5,14 +5,14 @@
<style>
html {background: #eeeeee;font: 14px/22px "Helvetica Neue", Helvetica, Arial, sans-serif;color: #525c66;}
html * {font-size: 100%;line-height: 1.6;}
#box {max-width: 650px;overflow:auto;margin: 25px auto 10px auto;padding: 10px 40px;border-width: 20px;text-align: left;-webkit-border-image: url(%BOX-BORDER%) 25;}
#box {max-width: 650px;overflow:auto;margin: 25px auto 10px auto;padding: 10px 40px;border-width: 20px;text-align: %LEFT_STR%;-webkit-border-image: url(%BOX-BORDER%) 25;direction: %DIRECTION%;}
hr {color: lightgray;width: 100%;}
img {float: left;margin-left: -20px;margin-top: 15px;}
h1 {font-size: 150%;font-weight: bold;border-bottom: 1px solid #f4f4f4;margin-left: 48px;margin-right: 50px;}
h2 {font-size: 100%;font-weight: normal;border-bottom: 1px solid #f4f4f4;margin-left: 48px;padding: 5px 0px 10px 2px;margin-right: 50px;}
ul {font-size: 90%;padding-left: 48px;margin: 20px 0;max-width:600px;}
img {float: %LEFT_STR%;margin-%LEFT_STR%: -20px;margin-top: 15px;}
h1 {font-size: 150%;font-weight: bold;border-bottom: 1px solid #f4f4f4;margin-%LEFT_STR%: 48px;margin-%RIGHT_STR%: 50px;}
h2 {font-size: 100%;font-weight: normal;border-bottom: 1px solid #f4f4f4;margin-%LEFT_STR%: 48px;padding: 5px 0px 10px 2px;margin-%RIGHT_STR%: 50px;}
ul {font-size: 90%;padding-%LEFT_STR%: 48px;margin: 20px 0;max-width:600px;}
li {padding: 5px;}
#reloadButton {padding-left: 48px;margin-top: 20px;min-width: 100px;}
#reloadButton {padding-%LEFT_STR%: 48px;margin-top: 20px;min-width: 100px;}
</style>
</head>
<body>

View File

@ -5,9 +5,9 @@
<style>
html {background: #eeeeee;font: 13px/22px "Helvetica Neue", Helvetica, Arial, sans-serif;color: #525c66;}
html * {font-size: 100%;line-height: 1.6;}
#box {max-width: 650px;overflow:auto;margin: 25px auto 10px auto;padding: 10px 40px;border-width: 20px;-webkit-border-image: url(%BOX-BORDER%) 25;text-align: left;}
#box {max-width: 650px;overflow:auto;margin: 25px auto 10px auto;padding: 10px 40px;border-width: 20px;-webkit-border-image: url(%BOX-BORDER%) 25;text-align: %LEFT_STR%;direction: %DIRECTION%;}
h1 {color: #1a4ba4;font-size: 160%;margin-bottom: 0px;}
p {margin-left: 1%;}
p {margin-%LEFT_STR%: 1%;}
.submit {width: 100px;}
select {width: 200px;}
textarea {width: 400px;height: 100px; border: 1px solid #babcb8;}
@ -41,7 +41,7 @@ function checkFields()
<tr><td>%EMAIL%*:</td><td><input type="text" id="mail" name="mail" required> </tr>
<tr><td>%TYPE%:</td><td><input type="text" id="type" name="type" required> </tr>
<tr><td>%DESCRIPTION%:</td><td><textarea id="text" name="text" required></textarea> </tr>
<tr><td colspan=2 align=right><input class="submit" type="submit" name="ok" value="%SEND%"> </tr>
<tr><td colspan=2 align=%RIGHT_STR%><input class="submit" type="submit" name="ok" value="%SEND%"> </tr>
</form>
</table>
</p>

View File

@ -3,39 +3,39 @@
<title>%SITE-TITLE%</title>
<link rel="icon" href="%FAVICON%" type="image/x-icon" />
<style type="text/css" media="screen">
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;}
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: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;}
#quickdial {margin: auto;text-align: center;}
#quickdial div.entry {position: relative; float: left; border-width: 10px;
#quickdial div.entry {position: relative; float: %LEFT_STR%; border-width: 10px;
-webkit-border-image: url(%BOX-BORDER%) 10;margin: 5px;}
#quickdial img {display: block;margin: auto;}
#quickdial a {position: absolute;left: 0px;top: 0px;width: 100%;height: 87%;}
#quickdial a {position: absolute;%LEFT_STR%: 0px;top: 0px;width: 100%;height: 87%;}
div.entry:hover .edit, div.entry:hover .close, div.entry:hover .reload{display: inline;}
span.boxTitle {width:100%;max-height: 20px; position: absolute;top: 88%;left: 0px;text-align: center;overflow:hidden;}
span.close {width: 14px;height: 14px;position: absolute;left: 92%;top: 90%;
span.boxTitle {width:100%;max-height: 20px; position: absolute;top: 88%;%LEFT_STR%: 0px;text-align: center;overflow:hidden;}
span.close {width: 14px;height: 14px;position: absolute;%LEFT_STR%: 92%;top: 90%;
background: url(%IMG_CLOSE%) no-repeat;background-position: center;border: 1px solid transparent;display: none;}
span.close:hover {border-color: grey; border-radius: 3px;}
span.edit {width: 14px;height: 14px;position: absolute;left: 0px;top: 90%;
span.edit {width: 14px;height: 14px;position: absolute;%LEFT_STR%: 0px;top: 90%;
background: url(%IMG_EDIT%) no-repeat;background-position: center;border: 1px solid transparent;display: none;}
span.edit:hover {border-color: grey; border-radius: 3px;}
span.reload {width: 16px;height: 16px;position: absolute;left: 92%;top: 0px;background: url(%IMG_RELOAD%) no-repeat;background-position: center;border: 1px solid transparent;display: none;}
span.reload {width: 16px;height: 16px;position: absolute;%LEFT_STR%: 92%;top: 0px;background: url(%IMG_RELOAD%) no-repeat;background-position: center;border: 1px solid transparent;display: none;}
span.reload:hover {border-color: grey; border-radius: 4px;}
#overlay-edit {width: 380px;max-height: 265px;border-width: 20px;margin-left:auto;margin-right: auto;margin-top: 100px;-webkit-border-image: url(%BOX-BORDER%) 25;-webkit-box-shadow: 0px 5px 80px #505050;border-radius:10px;}
#overlay-edit img {display: block;margin-left: auto;margin-right: auto;}
#overlay-edit .buttonbox input {margin-right:0px;margin-left:3px;}
#overlay-edit {width: 380px;max-height: 265px;border-width: 20px;margin-%LEFT_STR%:auto;margin-%RIGHT_STR%: auto;margin-top: 100px;-webkit-border-image: url(%BOX-BORDER%) 25;-webkit-box-shadow: 0px 5px 80px #505050;border-radius:10px;}
#overlay-edit img {display: block;margin-%LEFT_STR%: auto;margin-%RIGHT_STR%: auto;}
#overlay-edit .buttonbox input {margin-%RIGHT_STR%:0px;margin-%LEFT_STR%:3px;}
.formTable {width: 350px;margin-left: auto;margin-right: auto;margin-top: 15px;}
.formTable {width: 350px;margin-%LEFT_STR%: auto;margin-%RIGHT_STR%: auto;margin-top: 15px;}
.formTable input[type="text"] {width: 100%;-webkit-user-select: auto;}
.sett {position: absolute;right:36px;top:10px;width: 24px;height: 24px;background: url(%IMG_SETTINGS%); cursor: pointer;}
#settingsBox {margin-left:auto;margin-right: auto;margin-top: 100px;width: 350px;height: auto;padding:0 8px;-webkit-border-image: url(%BOX-BORDER%) 25;-webkit-box-shadow: 0px 5px 80px #505050;border-radius:10px;border-width: 20px;}
#settingsBox .content {margin-left:auto;margin-right:auto;padding-bottom:2px;border-bottom: 1px solid #888;}
#settingsBox .thumbhold {margin-left:auto;margin-right:auto;margin-bottom: 5px;padding: 1px;border-radius: 10px;text-align:center;width:180px;height:100px;background: #AAA;}
#settingsBox .thumbhold p {padding: 0;background: #eeeeee url("%IMG_BACKGROUND%") no-repeat center center;background-size: %B_SIZE%;width: 178px;height:98px;border-radius: 10px;position: relative;left: 1px;top: 1px;line-height:98px;cursor:default;}
.sett {position: absolute;%RIGHT_STR%:36px;top:10px;width: 24px;height: 24px;background: url(%IMG_SETTINGS%); cursor: pointer;}
#settingsBox {margin-%LEFT_STR%:auto;margin-%RIGHT_STR%: auto;margin-top: 100px;width: 350px;height: auto;padding:0 8px;-webkit-border-image: url(%BOX-BORDER%) 25;-webkit-box-shadow: 0px 5px 80px #505050;border-radius:10px;border-width: 20px;}
#settingsBox .content {margin-%LEFT_STR%:auto;margin-%RIGHT_STR%:auto;padding-bottom:2px;border-bottom: 1px solid #888;}
#settingsBox .thumbhold {margin-%LEFT_STR%:auto;margin-%RIGHT_STR%:auto;margin-bottom: 5px;padding: 1px;border-radius: 10px;text-align:center;width:180px;height:100px;background: #AAA;}
#settingsBox .thumbhold p {padding: 0;background: #eeeeee url("%IMG_BACKGROUND%") no-repeat center center;background-size: %B_SIZE%;width: 178px;height:98px;border-radius: 10px;position: relative;%LEFT_STR%: 1px;top: 1px;line-height:98px;cursor:default;}
#settingsBox p label {margin: 2px;padding: 1px;text-align: center;}
#settingsBox p select {margin: 2px;padding: 1px;text-align: center;width: auto;}
#settingsBox p select option {text-align: center;}
@ -43,10 +43,10 @@ span.reload:hover {border-color: grey; border-radius: 4px;}
#settingsBox .button {margin: 2px;padding: 1px;text-align:center;width: 98%;}
#settingsBox .rowsel {margin: 2px;padding: 3px 0;border-bottom: 1px solid #888;}
#settingsBox .rowsel input {text-align: center;width: 80%;height: 12px;margin: 0px;padding-bottom: 0;}
#settingsBox .rowsel span {font-weight: bold;text-align: center;margin: 2px;margin-right: 7px;display: inline-block;width: 25px;}
#settingsBox .rowsel span {font-weight: bold;text-align: center;margin: 2px;margin-%RIGHT_STR%: 7px;display: inline-block;width: 25px;}
.buttonbox {margin-top: 5px;margin-bottom:-5px;text-align:right;}
.overlay {background:rgba(128,128,128,0.8);background:-webkit-radial-gradient(rgba(127, 127, 127, 0.5),rgba(127, 127, 127, 0.5) 35%,rgba(0, 0, 0, 0.7));bottom:0;left: 0;padding: 20px;padding-bottom: 130px;position: fixed;right:0;top:0;}
.buttonbox {margin-top: 5px;margin-bottom:-5px;text-align:%RIGHT_STR%;}
.overlay {background:rgba(128,128,128,0.8);background:-webkit-radial-gradient(rgba(127, 127, 127, 0.5),rgba(127, 127, 127, 0.5) 35%,rgba(0, 0, 0, 0.7));bottom:0;%LEFT_STR%: 0;padding: 20px;padding-bottom: 130px;position: fixed;%RIGHT_STR%:0;top:0;}
</style>
<script type="text/javascript" src="%JQUERY%"></script>
<script type="text/javascript" src="%JQUERY-UI%"></script>

View File

@ -4,7 +4,7 @@
<link rel="icon" href="%FAVICON%" type="image/x-icon" />
<style>
html {background: #eeeeee;font: 13px/22px "Helvetica Neue", Helvetica, Arial, sans-serif;color: #525c66;}
#box {max-width: 500px;margin: 25px auto 0px auto;padding: 0px 40px 0px 40px;border-width: 20px;-webkit-border-image: url(%BOX-BORDER%) 25;}
#box {max-width: 500px;margin: 25px auto 0px auto;padding: 0px 40px 0px 40px;border-width: 20px;-webkit-border-image: url(%BOX-BORDER%) 25;direction: %DIRECTION%;}
h1 {color: #1a4ba4;font-size: 160%;margin-top: 0px;}
.line {width: 400px;height: 25px;text-align: center;border: 1px solid #babcb8;}
.line:focus {border-color: #579eea;}

View File

@ -149,6 +149,7 @@ QString QupZillaSchemeReply::reportbugPage()
bPage.replace("%SEND%", tr("Send"));
bPage.replace("%E-MAIL-OPTIONAL%", tr("E-mail is optional<br/><b>Note: </b>Please read how to make a bug report <a href=%1>here</a> first.").arg("https://github.com/QupZilla/qupzilla/wiki/Bug-Reports target=_blank"));
bPage.replace("%FIELDS-ARE-REQUIRED%", tr("Please fill out all required fields!"));
bPage = WebPage::applyDirectionToPage(bPage);
return bPage;
}
@ -172,6 +173,7 @@ QString QupZillaSchemeReply::startPage()
sPage.replace("%WWW%", QupZilla::WIKIADDRESS);
sPage.replace("%ABOUT-QUPZILLA%", tr("About QupZilla"));
sPage.replace("%PRIVATE-BROWSING%", mApp->isPrivateSession() ? tr("<h1>Private Browsing</h1>") : "");
sPage = WebPage::applyDirectionToPage(sPage);
return sPage;
}
@ -239,6 +241,7 @@ QString QupZillaSchemeReply::aboutPage()
authorString("Piccoro McKay Lenz", "mckaygerhard@gmail.com") + " (Venezulean Spanish)<br/>" +
authorString("Stanislav Kuznietsov", "stanislav_kuznetsov@ukr.net") + " (Ukrainian)"
);
aPage = WebPage::applyDirectionToPage(aPage);
}
return aPage;
@ -285,6 +288,7 @@ QString QupZillaSchemeReply::speeddialPage()
dPage.replace("%TXT_NRROWS%", tr("Maximum pages in a row:"));
dPage.replace("%TXT_SDSIZE%", tr("Change size of pages:"));
dPage.replace("%TXT_CNTRDLS%", tr("Center speed dials"));
dPage = WebPage::applyDirectionToPage(dPage);
}
QString page = dPage;
@ -375,6 +379,8 @@ QString QupZillaSchemeReply::configPage()
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Windows 7 API"), w7APIEnabled) +
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("KDE integration"), KDEIntegration) +
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Portable build"), portableBuild));
cPage = WebPage::applyDirectionToPage(cPage);
}
QString page = cPage;

View File

@ -691,6 +691,7 @@ bool WebPage::extension(Extension extension, const ExtensionOption* option, Exte
errString.replace("%FAVICON%", "qrc:html/adblock_big.png");
errString.replace("%RULE%", tr("Blocked by <i>%1</i>").arg(rule));
errString = applyDirectionToPage(errString);
exReturn->baseUrl = exOption->url;
exReturn->content = QString(errString + "<span id=\"qupzilla-error-page\"></span>").toUtf8();
@ -745,6 +746,7 @@ bool WebPage::extension(Extension extension, const ExtensionOption* option, Exte
errString.replace("%LI-2%", tr("If you are unable to load any pages, check your computer's network connection."));
errString.replace("%LI-3%", tr("If your computer or network is protected by a firewall or proxy, make sure that QupZilla is permitted to access the Web."));
errString.replace("%TRY-AGAIN%", tr("Try Again"));
errString = applyDirectionToPage(errString);
exReturn->content = QString(errString + "<span id=\"qupzilla-error-page\"></span>").toUtf8();
return true;
@ -941,3 +943,22 @@ WebPage::~WebPage()
s_livingPages.removeOne(this);
}
QString WebPage::applyDirectionToPage(const QString &pageContents)
{
QString direction = "ltr";
QString right_str = "right";
QString left_str = "left";
if (QApplication::isRightToLeft()) {
direction = "rtl";
right_str = "left";
left_str = "right";
}
QString result = pageContents;
result.replace("%DIRECTION%", direction);
result.replace("%RIGHT_STR%", right_str);
result.replace("%LEFT_STR%", left_str);
return result;
}

View File

@ -78,6 +78,7 @@ public:
static bool isPointerSafeToUse(WebPage* page);
void disconnectObjects();
static QString applyDirectionToPage(const QString &pageContents);
signals:
void privacyChanged(bool status);