Skip to content

Commit 434ad3a

Browse files
fix(@desktop/browser): Fix further missing look and feel for browser's
incognito mode.
1 parent 4ea7c51 commit 434ad3a

File tree

6 files changed

+35
-21
lines changed

6 files changed

+35
-21
lines changed

ui/StatusQ/src/StatusQ/Layout/StatusSectionLayoutLandscape.qml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ SplitView {
170170
id: statusToolBar
171171
anchors.top: parent.top
172172
width: visible ? parent.width : 0
173+
height: visible ? implicitHeight : 0
173174
visible: root.showHeader
174175
headerContent: LayoutItemProxy {
175176
id: headerContentProxy
@@ -193,6 +194,7 @@ SplitView {
193194
height: root.footer ? root.footer.height : 0
194195
anchors.bottom: parent.bottom
195196
target: root.footer
197+
visible: !!target
196198
}
197199
}
198200
}

ui/app/AppLayouts/Browser/BrowserLayout.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ StatusSectionLayout {
198198
}
199199
}
200200

201+
showHeader: false
201202
backgroundColor: Theme.palette.statusAppNavBar.backgroundColor
202203
centerPanel: Rectangle {
203204
id: browserWindow

ui/app/AppLayouts/Browser/controls/BrowserHeaderButton.qml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@ import QtQuick
33
import StatusQ.Core.Theme
44
import StatusQ.Controls
55

6-
StatusFlatRoundButton {
6+
StatusFlatButton {
77
id: root
88

99
property bool incognitoMode: false
1010

1111
// as per design
12-
implicitWidth: 40
13-
implicitHeight: 40
12+
implicitWidth: 36
13+
implicitHeight: 36
14+
radius: width/2
1415

1516
type: StatusFlatRoundButton.Type.Tertiary
16-
icon.color: root.incognitoMode ?
17+
asset.color: root.incognitoMode ?
1718
Theme.palette.privacyColors.tertiary:
1819
hovered ? Theme.palette.primaryColor1:
1920
Theme.palette.baseColor1
20-
icon.disabledColor: root.incognitoMode ?
21+
asset.disabledColor: root.incognitoMode ?
2122
Theme.palette.privacyColors.tertiaryOpaque:
2223
Theme.palette.baseColor2
23-
backgroundHoverColor: root.incognitoMode ?
24+
hoverColor: root.incognitoMode ?
2425
Theme.palette.privacyColors.secondary:
2526
Theme.palette.baseColor2
26-
sensor.acceptedButtons: Qt.LeftButton | Qt.RightButton
2727
}

ui/app/AppLayouts/Browser/panels/BrowserHeader.qml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Rectangle {
4242
QtObject {
4343
id: _internal
4444
readonly property int innerMargin: 12
45-
readonly property int buttonSize: 40
45+
readonly property int buttonSize: 36
4646
}
4747

4848
width: parent.width
@@ -54,7 +54,7 @@ Rectangle {
5454
RowLayout {
5555
id: barRow
5656
width: parent.width
57-
height: 56
57+
height: 48
5858
spacing: _internal.innerMargin
5959

6060
BrowserHeaderButton {
@@ -108,7 +108,7 @@ Rectangle {
108108

109109
StatusTextField {
110110
id: addressBar
111-
Layout.preferredHeight: 40
111+
Layout.preferredHeight: 26
112112
Layout.fillWidth: true
113113
background: Rectangle {
114114
color: root.currentTabIncognito ?
@@ -121,6 +121,7 @@ Rectangle {
121121
leftPadding: Theme.padding
122122
rightPadding: addFavoriteBtn.width + reloadBtn.width + Theme.bigPadding
123123
placeholderText: qsTr("Enter URL")
124+
font.pixelSize: Theme.additionalTextSize
124125
focus: !SQUtils.Utils.isMobile
125126
color: root.currentTabIncognito ?
126127
Theme.palette.privacyColors.tertiary:
@@ -159,6 +160,7 @@ Rectangle {
159160
enabled: true
160161
model: root.browserDappsModel
161162
showConnectButton: false
163+
backgroundRadius: width/2
162164

163165
onDisconnectDapp: function(dappUrl) {
164166
root.disconnectDapp(dappUrl)
@@ -174,21 +176,19 @@ Rectangle {
174176
}
175177
}
176178

177-
Loader {
178-
active: true
179-
sourceComponent: BrowserHeaderButton {
180-
incognitoMode: root.currentTabIncognito
181-
icon.name: "homepage/wallet"
182-
onPressed: {
183-
root.openWalletMenu()
184-
}
179+
BrowserHeaderButton {
180+
incognitoMode: root.currentTabIncognito
181+
icon.name: "homepage/wallet"
182+
onPressed: {
183+
root.openWalletMenu()
185184
}
186185
}
187186

188187
BrowserHeaderButton {
189188
id: settingsMenuButton
190189

191190
incognitoMode: root.currentTabIncognito
191+
asset.rotation: 90
192192
icon.name: "more"
193193
Layout.rightMargin: _internal.innerMargin
194194
highlighted: settingMenu.opened

ui/app/AppLayouts/Browser/panels/BrowserTabView.qml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import StatusQ.Controls
88
import StatusQ.Components
99
import StatusQ.Core.Utils as SQUtils
1010

11+
import AppLayouts.Browser.controls
12+
1113
import utils
1214

1315
FocusScope {
@@ -41,6 +43,7 @@ FocusScope {
4143
readonly property int minTabButtonWidth: 118
4244
readonly property int maxTabButtonWidth: 236
4345
readonly property bool tabBarOverflowing: tabBarListView.visibleArea.widthRatio < 1
46+
readonly property bool currentTabIcognito: root.getCurrentTab()?.profile?.offTheRecord ?? false
4447
}
4548

4649
TabBar {
@@ -50,7 +53,9 @@ FocusScope {
5053
anchors.right: parent.right
5154
height: root.tabHeight
5255
background: Rectangle {
53-
color: Theme.palette.statusAppNavBar.backgroundColor
56+
color: d.currentTabIcognito ?
57+
Theme.palette.privacyColors.secondary:
58+
Theme.palette.statusAppNavBar.backgroundColor
5459
}
5560
contentItem: ListView {
5661
id: tabBarListView
@@ -153,11 +158,15 @@ FocusScope {
153158
color: Theme.palette.transparent
154159
width: d.tabHeight
155160
height: d.tabHeight
156-
StatusFlatButton {
161+
BrowserHeaderButton {
157162
anchors.fill: parent
158163
anchors.margins: 4
164+
radius: Theme.radius
159165
icon.name: "add"
160-
type: StatusBaseButton.Type.Primary
166+
incognitoMode: d.currentTabIcognito
167+
hoverColor: d.currentTabIcognito ?
168+
Theme.palette.privacyColors.primary:
169+
Theme.palette.indirectColor1
161170
onClicked: root.openNewTabTriggered()
162171
}
163172
}

ui/app/AppLayouts/Wallet/controls/DappsComboBox.qml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ ComboBox {
2525
property bool dappClickable: true
2626
property bool incognitoMode: false
2727
property var popupDirectParent: root
28+
property int backgroundRadius: Theme.radius
2829

2930
implicitHeight: 38
3031
implicitWidth: 38
@@ -44,6 +45,7 @@ ComboBox {
4445
: Theme.palette.directColor8;
4546
}
4647
border.width: 0
48+
radius: root.backgroundRadius
4749
}
4850

4951
indicator: null

0 commit comments

Comments
 (0)