Skip to content

Commit

Permalink
examples/QMLPlayer: less and larger buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Feb 21, 2016
1 parent ab851f9 commit f821da2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
32 changes: 17 additions & 15 deletions examples/QMLPlayer/qml/QMLPlayer/ControlPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ Rectangle {
/*
Button {
id: backwardBtn
anchors.right: playBtn.left
anchors.right: stopBtn.left
anchors.verticalCenter: playBtn.verticalCenter
bgColor: "transparent"
bgColorSelected: "transparent"
Expand All @@ -353,7 +353,8 @@ Rectangle {
//player.stop()
stop()
}
}/*
}
/*
Button {
id: forwardBtn
anchors.left: playBtn.right
Expand All @@ -377,8 +378,8 @@ Rectangle {
checked: false
bgColor: "transparent"
bgColorSelected: "transparent"
width: Utils.scaled(25)
height: Utils.scaled(25)
width: Utils.scaled(30)
height: Utils.scaled(30)
icon: Utils.resurl("theme/default/fullscreen.svg")
iconChecked: Utils.resurl("theme/default/fullscreen.svg")
visible: true
Expand All @@ -397,8 +398,8 @@ Rectangle {
checked: false
bgColor: "transparent"
bgColorSelected: "transparent"
width: Utils.scaled(25)
height: Utils.scaled(25)
width: Utils.scaled(30)
height: Utils.scaled(30)
icon: Utils.resurl("theme/default/volume.svg")
iconChecked: Utils.resurl("theme/default/mute.svg")
onHoveredChanged: {
Expand All @@ -411,35 +412,36 @@ Rectangle {
anchors.right: parent.right
anchors.rightMargin: Utils.scaled(50)
anchors.verticalCenter: parent.verticalCenter
/*
Button {
id: infoBtn
bgColor: "transparent"
bgColorSelected: "transparent"
width: Utils.scaled(25)
height: Utils.scaled(25)
width: Utils.scaled(30)
height: Utils.scaled(30)
icon: Utils.resurl("theme/default/info.svg")
visible: true
onClicked: showInfo()
}
}*/
Button {
id: openFileBtn
bgColor: "transparent"
bgColorSelected: "transparent"
width: Utils.scaled(25)
height: Utils.scaled(25)
width: Utils.scaled(30)
height: Utils.scaled(30)
icon: Utils.resurl("theme/default/open.svg")
onClicked: openFile()
onPressAndHold: openUrl()
}
} /*
Button {
id: helpBtn
bgColor: "transparent"
bgColorSelected: "transparent"
width: Utils.scaled(25)
height: Utils.scaled(25)
width: Utils.scaled(30)
height: Utils.scaled(30)
icon: Utils.resurl("theme/default/help.svg")
onClicked: showHelp()
}
}*/
}
}

Expand Down
2 changes: 1 addition & 1 deletion examples/QMLPlayer/qml/QMLPlayer/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ Rectangle {
right: parent.right
bottom: control.top
}
width: Utils.scaled(140)
width: Utils.scaled(100)
onClicked: {
pageLoader.source = selectedUrl
if (pageLoader.item)
Expand Down
6 changes: 3 additions & 3 deletions examples/common/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ QOptions get_common_options()
("language", QLatin1String("system"), QLatin1String("language on UI. can be 'system', 'none' and locale name e.g. zh_CN"))
("log", QString(), QLatin1String("log level. can be 'off', 'fatal', 'critical', 'warning', 'debug', 'all'"))
("logfile"
#if defined(Q_OS_ANDROID) || defined(Q_OS_IOS)
#if defined(Q_OS_IOS)
, appDataDir().append(QString::fromLatin1("/log-%1.txt"))
#elif defined(Q_OS_WINRT)
#elif defined(Q_OS_WINRT) || defined(Q_OS_ANDROID)
, QString()
#else
, QString::fromLatin1("log-%1.txt")
Expand Down Expand Up @@ -136,7 +136,7 @@ void do_common_options(const QOptions &options, const QString& appName)
}
// has no effect if qInstallMessageHandler() called
//qSetMessagePattern("%{function} @%{line}: %{message}");
#if !defined(Q_OS_WINRT)
#if !defined(Q_OS_WINRT) && !defined(Q_OS_ANDROID)
QString app(appName);
if (app.isEmpty() && qApp)
app = qApp->applicationName();
Expand Down

0 comments on commit f821da2

Please sign in to comment.