"<p>" + tr("There's life outside the browser!") + "</p>"
"<p>" + tr("Version %1").arg(Constants::VERSION) + "</p>"
+ QString("<p><a href=\"%1/\">%1</a></p>").arg(Constants::WEBSITE) +
-#if !defined(APP_MAC) && !defined(Q_WS_WIN)
+#if !defined(APP_MAC) && !defined(APP_WIN)
"<p>" + tr("%1 is Free Software but its development takes precious time.").arg(Constants::APP_NAME) + "<br/>"
+ tr("Please <a href='%1'>donate</a> to support the continued development of %2.")
.arg(QString(Constants::WEBSITE).append("#donate"), Constants::APP_NAME) + "</p>"
.arg(QString("<a href=\"mailto:%1\">%1</a>").arg(Constants::EMAIL)) + "</p>"
"<p>"
- + tr("Icon designed by %1.").arg("Sebastian Kraft")
+ + tr("Icon designed by %1.").arg("<a href='http://www.kolorguild.com/'>David Nel</a>")
+ "<br>" + tr("Compact mode contributed by %1.").arg("Stefan Brück")
+ "<br>" + tr("HTTP proxy support contributed by %1.").arg("Kiwamu Okabe")
+ "</p>"
"Changtai Liang (zh_CN), "
"Veta Branislav (mkd_MKD)"
) + "</p>"
-#if !defined(APP_MAC) && !defined(Q_WS_WIN)
+#if !defined(APP_MAC) && !defined(APP_WIN)
"<p>" + tr("Released under the <a href='%1'>GNU General Public License</a>")
.arg("http://www.gnu.org/licenses/gpl.html") + "</p>"
#endif
helpMenu = menuBar()->addMenu(tr("&Help"));
helpMenu->addAction(siteAct);
+#if !defined(APP_MAC) && !defined(APP_WIN)
helpMenu->addAction(donateAct);
+#endif
helpMenu->addAction(aboutAct);
}
mainToolBar = new QToolBar(this);
#if QT_VERSION < 0x040600 | defined(APP_MAC)
mainToolBar->setToolButtonStyle(Qt::ToolButtonIconOnly);
+#elif defined(APP_WIN)
+ mainToolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
+ mainToolBar->setStyleSheet(
+ "QToolBar {"
+ "background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #fff, stop:1 #ccc);"
+ "border: 0;"
+ "border-bottom: 1px solid #a0afc3;"
+ "}");
#else
mainToolBar->setToolButtonStyle(Qt::ToolButtonFollowStyle);
#endif
mainToolBar->setFloatable(false);
mainToolBar->setMovable(false);
-#ifdef APP_MAC
+#if defined(APP_MAC) | defined(APP_WIN)
mainToolBar->setIconSize(QSize(32, 32));
#endif
// remove ugly borders on OSX
// also remove excessive spacing
- statusBar()->setStyleSheet("::item{border:0 solid} QToolBar {padding:0;spacing:0;margin:0}");
+ statusBar()->setStyleSheet("::item{border:0 solid} QToolBar {padding:0;spacing:0;margin:0;border:0}");
QToolBar *toolBar = new QToolBar(this);
toolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
QFont biggerFont = FontUtils::big();
QFont smallerFont = FontUtils::smallBold();
-#ifdef APP_MAC
+#if defined(APP_MAC) | defined(APP_WIN)
// speedup painting since we'll paint the whole background
// by ourselves anyway in paintEvent()
setAttribute(Qt::WA_OpaquePaintEvent);
recentKeywordsLayout->setSpacing(5);
recentKeywordsLayout->setAlignment(Qt::AlignVCenter | Qt::AlignLeft);
recentKeywordsLabel = new QLabel(tr("Recent keywords").toUpper(), this);
-#ifdef APP_MAC
+#if defined(APP_MAC) | defined(APP_WIN)
QPalette palette = recentKeywordsLabel->palette();
palette.setColor(QPalette::WindowText, QColor(0x65, 0x71, 0x80));
recentKeywordsLabel->setPalette(palette);
}
void SearchView::paintEvent(QPaintEvent * /*event*/) {
-#ifdef APP_MAC
+#if defined(APP_MAC) | defined(APP_WIN)
QBrush brush;
if (window()->isActiveWindow()) {
brush = QBrush(QColor(0xdd, 0xe4, 0xeb));
void DownloadItem::downloadReadyRead() {
if (!m_file.isOpen()) {
- if (!m_file.open(QIODevice::WriteOnly)) {
+ if (!m_file.open(QIODevice::ReadWrite)) {
qDebug() << QString("Error opening output file: %1").arg(m_file.errorString());
stop();
emit statusChanged();
#include "fontutils.h"
+static const int MIN_PIXEL_SIZE = 11;
+
const QFont FontUtils::small() {
static QFont font;
static bool initialized = false;
if (!initialized) {
initialized = true;
font.setPointSize(font.pointSize()*.85);
+ if (font.pixelSize() < MIN_PIXEL_SIZE) font.setPixelSize(MIN_PIXEL_SIZE);
}
return font;
}
initialized = true;
font.setPointSize(font.pointSize()*.85);
font.setBold(true);
+ if (font.pixelSize() < MIN_PIXEL_SIZE) font.setPixelSize(MIN_PIXEL_SIZE);
}
return font;
}
#ifdef APP_MAC
// #include "local/mac/mac_startup.h"
#endif
+#ifdef APP_WIN
+#include "local/win/qtwin.h"
+#endif
int main(int argc, char **argv) {
mainWin.setWindowIcon(appIcon);
#endif
+#ifdef APP_WIN
+ if (QtWin::isCompositionEnabled()) {
+ QtWin::extendFrameIntoClientArea(&mainWin);
+ mainWin.setContentsMargins(0, 0, 0, 0);
+ }
+ app.setFont(QFont("Segoe UI", 9));
+#endif
+
mainWin.show();
app.setActivationWindow(&mainWin, true);
painter->fillRect(0, 0, width, mh, QBrush(gradient));
painter->fillRect(0, mh, width, mh, color);
-#ifdef APP_MAC
+#if defined(APP_MAC) | defined(APP_WIN)
painter->drawRect(-1, -1, width+1, height);
#else
painter->drawRect(0, 0, width, height);
QString url = formatUrl.mid(separator + 1);
if (format == definitionCode) {
+ qDebug() << "Found format" << definitionCode;
QUrl videoUrl = QUrl::fromEncoded(url.toUtf8(), QUrl::StrictMode);
m_streamUrl = videoUrl;
emit gotStreamUrl(videoUrl);