⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 101996 in webkit


Ignore:
Timestamp:
Dec 5, 2011, 6:47:46 AM (15 years ago)
Author:
kenneth@webkit.org
Message:

[Qt] Make the UI of the MiniBrowser slightly nicer

Rubberstamped by Simon Hausmann.

  • Add proper padding
  • Show feedback when pressing on the toolbar icons
  • Make the text entry better looking
  • MiniBrowser/qt/qml/BrowserWindow.qml:
Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r101979 r101996  
     12011-12-05  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     2
     3        [Qt] Make the UI of the MiniBrowser slightly nicer
     4
     5        Rubberstamped by Simon Hausmann.
     6
     7        - Add proper padding
     8        - Show feedback when pressing on the toolbar icons
     9        - Make the text entry better looking
     10
     11        * MiniBrowser/qt/qml/BrowserWindow.qml:
     12
    1132011-12-05  Kristóf Kosztyó  <kkristof@inf.u-szeged.hu>
    214
  • trunk/Tools/MiniBrowser/qt/qml/BrowserWindow.qml

    r99946 r101996  
    4949        id: navigationBar
    5050        color: "#efefef"
    51         height: 30
     51        height: 38
    5252        anchors {
    5353            top: parent.top
     
    5757
    5858        Row {
     59            height: parent.height - 6
     60            anchors {
     61                verticalCenter: parent.verticalCenter
     62                left: parent.left
     63                leftMargin: 3
     64            }
     65            spacing: 3
    5966            id: controlsRow
    60             spacing: 4
    6167            Rectangle {
    6268                id: backButton
    63                 height: navigationBar.height - 2
     69                height: parent.height
    6470                width: height
    6571                color: "#efefef"
     72                radius: 6
     73
     74                property alias enabled: webView.canGoBack
    6675
    6776                Image {
     
    7281                Rectangle {
    7382                    anchors.fill: parent
    74                     color: reloadButton.color
     83                    color: parent.color
     84                    radius: parent.radius
    7585                    opacity: 0.8
    76                     visible: !webView.canGoBack
     86                    visible: !parent.enabled
    7787                }
    7888
    7989                MouseArea {
    8090                    anchors.fill: parent
     91                    onPressed: { if (parent.enabled) parent.color = "#cfcfcf" }
     92                    onReleased: { parent.color = "#efefef" }
    8193                    onClicked: {
    82                         console.log("going back")
    83                         webView.goBack()
     94                        if (parent.enabled) {
     95                            console.log("MiniBrowser: Going backward in session history.")
     96                            webView.goBack()
     97                        }
    8498                    }
    8599                }
     
    87101            Rectangle {
    88102                id: forwardButton
    89                 height: navigationBar.height - 2
     103                height: parent.height
    90104                width: height
    91105                color: "#efefef"
     106                radius: 6
     107
     108                property alias enabled: webView.canGoForward
    92109
    93110                Image {
     
    98115                Rectangle {
    99116                    anchors.fill: parent
    100                     color: forwardButton.color
     117                    color: parent.color
     118                    radius: parent.radius
    101119                    opacity: 0.8
    102                     visible: !webView.canGoForward
     120                    visible: !parent.enabled
    103121                }
    104122
    105123                MouseArea {
    106124                    anchors.fill: parent
     125                    onPressed: { if (parent.enabled) parent.color = "#cfcfcf" }
     126                    onReleased: { parent.color = "#efefef" }
    107127                    onClicked: {
    108                         console.log("going forward")
    109                         webView.goForward()
     128                        if (parent.enabled) {
     129                            console.log("MiniBrowser: Going forward in session history.")
     130                            webView.goForward()
     131                        }
    110132                    }
    111133                }
     
    113135            Rectangle {
    114136                id: reloadButton
    115                 height: navigationBar.height - 2
     137                height: parent.height
    116138                width: height
    117139                color: "#efefef"
     140                radius: 6
    118141
    119142                Image {
     
    124147                MouseArea {
    125148                    anchors.fill: parent
     149                    onPressed: { parent.color = "#cfcfcf" }
     150                    onReleased: { parent.color = "#efefef" }
    126151                    onClicked: {
    127152                        if (webView.canStop) {
     
    138163        Rectangle {
    139164            color: "white"
    140             height: navigationBar.height - 4
     165            height: 26
    141166            border.width: 1
     167            border.color: "#bfbfbf"
     168            radius: 3
    142169            anchors {
    143170                left: controlsRow.right
    144171                right: parent.right
    145                 margins: 2
     172                margins: 6
    146173                verticalCenter: parent.verticalCenter
    147174            }
     
    152179                    left: parent.left
    153180                }
     181                radius: 3
    154182                width: parent.width / 100 * webView.loadProgress
    155183                color: "blue"
     
    157185                visible: webView.loadProgress != 100
    158186            }
    159 
    160187            TextInput {
    161188                id: addressLine
     
    163190                selectByMouse: true
    164191                font {
    165                     pointSize: 14
    166                     family: "Helvetica"
     192                    pointSize: 11
     193                    family: "Sans"
    167194                }
    168195                anchors {
     
    170197                    left: parent.left
    171198                    right: parent.right
    172                     margins: 2
     199                    margins: 6
    173200                }
    174201
Note: See TracChangeset for help on using the changeset viewer.