Skip to content
Snippets Groups Projects
Commit 5f272b33 authored by Andreas Traczyk's avatar Andreas Traczyk
Browse files

accountcombobox: add relief and top border

Change-Id: Ic6b31470998abd833c07a413e5b839139590b317
parent 55cbcd38
No related branches found
No related tags found
No related merge requests found
...@@ -199,6 +199,17 @@ ComboBox { ...@@ -199,6 +199,17 @@ ComboBox {
implicitWidth: root.width implicitWidth: root.width
implicitHeight: root.height implicitHeight: root.height
color: JamiTheme.backgroundColor color: JamiTheme.backgroundColor
// TODO: this can be removed when frameless window is implemented
Rectangle {
height: 1
anchors {
top: parent.top
left: parent.left
right: parent.right
}
color: JamiTheme.tabbarBorderColor
}
} }
MouseArea { MouseArea {
......
/* /*
* Copyright (C) 2020 by Savoir-faire Linux * Copyright (C) 2020 by Savoir-faire Linux
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com> * Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
...@@ -16,26 +15,27 @@ ...@@ -16,26 +15,27 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import QtQuick 2.14 import QtQuick 2.14
import QtQuick.Controls 2.14 import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14 import QtQuick.Layouts 1.14
import QtGraphicalEffects 1.15
import net.jami.Models 1.0 import net.jami.Models 1.0
import net.jami.Adapters 1.0 import net.jami.Adapters 1.0
import "../../commoncomponents" import "../../commoncomponents"
Popup { Popup {
id: comboBoxPopup id: root
property bool toogleUpdatePopupHeight: false property bool toogleUpdatePopupHeight: false
y: accountComboBox.height - 1 y: accountComboBox.height - 1
implicitWidth: accountComboBox.width - 1 implicitWidth: accountComboBox.width - 1
// Hack - limite the accounts that can be shown. // Hack - limite the accounts that can be shown.
implicitHeight: { implicitHeight: {
comboBoxPopup.visible root.visible
return Math.min(accountComboBox.height * return Math.min(accountComboBox.height *
Math.min(5, accountListModel.rowCount() + 1), Math.min(5, accountListModel.rowCount() + 1),
mainViewSidePanelRect.height) mainViewSidePanelRect.height)
...@@ -140,7 +140,7 @@ Popup { ...@@ -140,7 +140,7 @@ Popup {
onReleased: { onReleased: {
itemCoboBackground.color = JamiTheme.releaseColor itemCoboBackground.color = JamiTheme.releaseColor
currentIndex = index currentIndex = index
comboBoxPopup.close() root.close()
AccountAdapter.accountChanged(index) AccountAdapter.accountChanged(index)
} }
onEntered: { onEntered: {
...@@ -166,23 +166,36 @@ Popup { ...@@ -166,23 +166,36 @@ Popup {
font.pointSize: JamiTheme.textFontSize font.pointSize: JamiTheme.textFontSize
onClicked: { onClicked: {
comboBoxPopup.close() root.close()
mainViewWindow.startWizard() mainViewWindow.startWizard()
} }
} }
ScrollIndicator.vertical: ScrollIndicator {} ScrollIndicator.vertical: ScrollIndicator {}
} }
background: Rectangle { background: Rectangle {
id: accountComboBoxPopup id: accountComboBoxPopup
color: JamiTheme.backgroundColor color: JamiTheme.backgroundColor
CustomBorder { CustomBorder {
commonBorder: false commonBorder: false
lBorderwidth: 1 lBorderwidth: 2
rBorderwidth: 1 rBorderwidth: 1
tBorderwidth: 1 tBorderwidth: 1
bBorderwidth: 1 bBorderwidth: 2
borderColor: JamiTheme.tabbarBorderColor borderColor: JamiTheme.tabbarBorderColor
} }
layer {
enabled: true
effect: DropShadow {
color: "#80000000"
verticalOffset: 2
horizontalOffset: 2
samples: 16
radius: 10
}
}
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment