Commit 2a51875f authored by Zeno Albisser's avatar Zeno Albisser Committed by Andras Becsi
Browse files

Move the icons into common.


Use the same icons for the widgets and qtquick example.
Remove the styling as it does not work on all platforms anyway.

Change-Id: Iff59455689619ae45823eb835768d7c4fc75bd93
Reviewed-by: default avatarAndras Becsi <andras.becsi@digia.com>
Showing with 18 additions and 21 deletions
......@@ -6,6 +6,8 @@ else:LIBPATH = $$getOutDir()/$$getConfigDir()/lib
HEADERS += common/util.h
RESOURCES += $$absolute_path(common/common_resources.qrc)
LIBS += -L$$LIBPATH -lQt5WebEngine
QMAKE_RPATHDIR += $$LIBPATH
......
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="icons">
<file alias="go-next.png">icons/go-next.png</file>
<file alias="go-previous.png">icons/go-previous.png</file>
<file alias="process-stop.png">icons/process-stop.png</file>
<file alias="view-refresh.png">icons/view-refresh.png</file>
</qresource>
</RCC>
File moved
......@@ -57,22 +57,19 @@ ApplicationWindow {
ToolButton {
id: backButton
iconName: "go-previous"
iconSource: ":/icons/go-previous.png"
iconSource: "icons/go-previous.png"
onClicked: webContentsView.goBack()
enabled: webContentsView.canGoBack
}
ToolButton {
id: forwardButton
iconName: "go-next"
iconSource: ":/icons/go-next.png"
iconSource: "icons/go-next.png"
onClicked: webContentsView.goForward()
enabled: webContentsView.canGoForward
}
ToolButton {
id: reloadButton
iconName: webContentsView.loading ? "process-stop" : "view-refresh"
iconSource: webContentsView.loading ? ":/icons/process-stop.png" : ":/icons/view-refresh.png"
iconSource: webContentsView.loading ? "icons/process-stop.png" : "icons/view-refresh.png"
onClicked: webContentsView.reload()
}
TextField {
......
......@@ -2,10 +2,4 @@
<qresource>
<file>quickwindow.qml</file>
</qresource>
<qresource prefix="/icons">
<file alias="go-next.png">icons/go-next.png</file>
<file alias="go-previous.png">icons/go-previous.png</file>
<file alias="process-stop.png">icons/process-stop.png</file>
<file alias="view-refresh.png">icons/view-refresh.png</file>
</qresource>
</RCC>
......@@ -50,10 +50,6 @@ WidgetWindow::WidgetWindow()
: m_webView(new QWebContentsView)
, addressLineEdit(0)
{
// Use oxygen as a fallback.
if (QIcon::themeName().isEmpty())
QIcon::setThemeName("oxygen");
setGeometry(0, 0, 800, 600);
QVBoxLayout* layout = new QVBoxLayout;
......@@ -64,15 +60,15 @@ WidgetWindow::WidgetWindow()
addressBar->setSpacing(margin); // Bigger buttons, less space between them
backButton = new QToolButton;
backButton->setIcon(QIcon::fromTheme("go-previous"));
backButton->setIcon(QIcon(":/icons/go-previous.png"));
addressBar->addWidget(backButton);
forwardButton = new QToolButton;
forwardButton->setIcon(QIcon::fromTheme("go-next"));
forwardButton->setIcon(QIcon(":/icons/go-next.png"));
addressBar->addWidget(forwardButton);
reloadButton = new QToolButton;
reloadButton->setIcon(QIcon::fromTheme("view-refresh"));
reloadButton->setIcon(QIcon::fromTheme(":/icons/view-refresh.png"));
addressBar->addWidget(reloadButton);
addressLineEdit = new QLineEdit;
......@@ -111,7 +107,7 @@ void WidgetWindow::setAddressBarUrl(const QUrl& url)
void WidgetWindow::loadStarted()
{
reloadButton->setIcon(QIcon::fromTheme("process-stop"));
reloadButton->setIcon(QIcon(":/icons/process-stop.png"));
}
void WidgetWindow::loadFinished(bool success)
......@@ -119,5 +115,5 @@ void WidgetWindow::loadFinished(bool success)
Q_UNUSED(success);
forwardButton->setEnabled(m_webView->canGoForward());
backButton->setEnabled(m_webView->canGoBack());
reloadButton->setIcon(QIcon::fromTheme("view-refresh"));
reloadButton->setIcon(QIcon(":/icons/view-refresh.png"));
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment