mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-07 14:44:01 +00:00
add visible focus on button to ease key navigation
allow call from pressing enter in new call search bar if dialer open
This commit is contained in:
parent
d09f7cad0b
commit
361866f9f9
9 changed files with 1080 additions and 1059 deletions
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -445,6 +445,7 @@ VariantObject *Utils::findAvatarByAddress(const QString &address) {
|
|||
VariantObject *data = new VariantObject("findAvatarByAddress", "");
|
||||
if (!data) return nullptr;
|
||||
data->makeRequest([address]() -> QVariant {
|
||||
if (CoreModel::getInstance()->getCore()->getGlobalState() != linphone::GlobalState::On) return QVariant();
|
||||
QString avatar;
|
||||
auto defaultFriendList = ToolModel::getAppFriendList();
|
||||
if (!defaultFriendList) return QVariant();
|
||||
|
|
@ -469,6 +470,7 @@ VariantObject *Utils::findFriendByAddress(const QString &address) {
|
|||
VariantObject *data = new VariantObject("findFriendByAddress");
|
||||
if (!data) return nullptr;
|
||||
data->makeRequest([address]() {
|
||||
if (CoreModel::getInstance()->getCore()->getGlobalState() != linphone::GlobalState::On) return QVariant();
|
||||
auto linFriend = ToolModel::findFriendByAddress(address);
|
||||
if (!linFriend) return QVariant();
|
||||
auto friendCore = FriendCore::create(linFriend);
|
||||
|
|
@ -490,6 +492,7 @@ VariantObject *Utils::getFriendSecurityLevel(const QString &address) {
|
|||
VariantObject *data = new VariantObject("getFriendAddressSecurityLevel");
|
||||
if (!data) return nullptr;
|
||||
data->makeRequest([address]() {
|
||||
if (CoreModel::getInstance()->getCore()->getGlobalState() != linphone::GlobalState::On) return QVariant();
|
||||
auto defaultFriendList = ToolModel::getAppFriendList();
|
||||
if (!defaultFriendList) return QVariant();
|
||||
auto linphoneAddr = ToolModel::interpretUrl(address);
|
||||
|
|
@ -509,6 +512,7 @@ VariantObject *Utils::getFriendAddressSecurityLevel(const QString &address) {
|
|||
VariantObject *data = new VariantObject("getFriendAddressSecurityLevel");
|
||||
if (!data) return nullptr;
|
||||
data->makeRequest([address]() {
|
||||
if (CoreModel::getInstance()->getCore()->getGlobalState() != linphone::GlobalState::On) return QVariant();
|
||||
auto defaultFriendList = ToolModel::getAppFriendList();
|
||||
if (!defaultFriendList) return QVariant();
|
||||
auto linphoneAddr = ToolModel::interpretUrl(address);
|
||||
|
|
|
|||
|
|
@ -178,6 +178,13 @@ ListView {
|
|||
Layout.rightMargin: mainItem.itemsRightMargin
|
||||
focus: true
|
||||
onClicked: mainItem.expanded = !mainItem.expanded
|
||||
Rectangle {
|
||||
anchors.fill: headerExpandButton
|
||||
radius: headerExpandButton.width/2
|
||||
visible: headerExpandButton.activeFocus
|
||||
opacity: 0.5
|
||||
color: DefaultStyle.main2_200
|
||||
}
|
||||
Accessible.name: (mainItem.expanded ?
|
||||
//: Shrink %1
|
||||
qsTr("shrink_accessible_name") :
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ FocusScope {
|
|||
mainItem.buttonPressed("+")
|
||||
event.accepted = true
|
||||
}
|
||||
if (event.key === Qt.Key_Enter) {
|
||||
if (event.key === Qt.Key_Enter || event.key === Qt.Key_Return) {
|
||||
mainItem.launchCall()
|
||||
event.accepted = true
|
||||
}
|
||||
|
|
@ -98,7 +98,7 @@ FocusScope {
|
|||
|
||||
Keys.onPressed: (event) => {
|
||||
event.accepted = false
|
||||
if (event.modifiers & Qt.KeypadModifier) {
|
||||
if (event.modifiers & Qt.KeypadModifier || event.key === Qt.Key_Return) {
|
||||
handleKeyPadEvent(event)
|
||||
}
|
||||
if (event.key === Qt.Key_Backspace) {
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ FocusScope {
|
|||
}
|
||||
Keys.onPressed: (event) => {
|
||||
event.accepted = false
|
||||
if (mainItem.numericPadPopup && mainItem.numericPadPopup.opened && (event.modifiers & Qt.KeypadModifier)) {
|
||||
if (mainItem.numericPadPopup && mainItem.numericPadPopup.opened && (event.modifiers & Qt.KeypadModifier || event.key === Qt.Key_Return)) {
|
||||
mainItem.numericPadPopup.keyPadKeyPressed(event)
|
||||
event.accepted = true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -219,6 +219,11 @@ AbstractMainPage {
|
|||
when: searchBar.text.length != 0
|
||||
value: false
|
||||
}
|
||||
Keys.onPressed: (event) => {
|
||||
if (event.key === Qt.Key_Enter || event.key === Qt.Key_Return) {
|
||||
mainItem.createCallFromSearchBarRequested()
|
||||
}
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
visible: SettingsCpp.callForwardToAddress.length > 0
|
||||
|
|
|
|||
|
|
@ -168,6 +168,10 @@
|
|||
pressed: "#00000000",
|
||||
checked: "#00000000"
|
||||
},
|
||||
borderColor: {
|
||||
normal: "#00000000",
|
||||
keybaordFocused: Linphone.DefaultStyle.main2_900
|
||||
},
|
||||
text: {
|
||||
normal: Linphone.DefaultStyle.main2_200,
|
||||
hovered: Linphone.DefaultStyle.main2_300,
|
||||
|
|
@ -190,6 +194,10 @@
|
|||
pressed: "#00000000",
|
||||
checked: "#00000000"
|
||||
},
|
||||
borderColor: {
|
||||
normal: "#00000000",
|
||||
keybaordFocused: Linphone.DefaultStyle.main2_900
|
||||
},
|
||||
text: {
|
||||
normal: Linphone.DefaultStyle.main2_600,
|
||||
hovered: Linphone.DefaultStyle.main2_700,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue