Merge pull request #1988 from gamesguru/fix/settings-comboBox-no-autocapture-scroll
prevent comboBox & spinner from capturing mouse scroll unless active
This commit is contained in:
parent
2ece2aee9f
commit
3a707a5ee5
5 changed files with 31 additions and 11 deletions
|
|
@ -450,8 +450,8 @@ linting:
|
|||
before_script:
|
||||
- apk update && apk add make git python3 py3-pip qt6-qtdeclarative-dev
|
||||
# clang18 seems to mess with the emit keyword when using the `->` operator
|
||||
- apk add clang17-extra-tools --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main
|
||||
- export PATH="$PATH:/usr/lib/llvm17/bin/:/root/.local/bin"
|
||||
- apk add clang-extra-tools --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main
|
||||
- export PATH="$PATH:/usr/lib/llvm/bin/:/root/.local/bin"
|
||||
- pip3 install --break-system-packages --user reuse
|
||||
script:
|
||||
- make lint
|
||||
|
|
|
|||
|
|
@ -246,6 +246,7 @@ endif()
|
|||
#
|
||||
# Discover Qt dependencies.
|
||||
#
|
||||
|
||||
find_package(Qt6 6.5 COMPONENTS Core Widgets Gui LinguistTools Svg Multimedia Qml QuickControls2 REQUIRED)
|
||||
if (Qt6Qml_VERSION VERSION_GREATER_EQUAL "6.10.0")
|
||||
find_package(Qt6 REQUIRED COMPONENTS GuiPrivate QmlPrivate)
|
||||
|
|
@ -298,7 +299,8 @@ if(NOT MSVC)
|
|||
-fsized-deallocation \
|
||||
-fdiagnostics-color=always \
|
||||
-Wunreachable-code \
|
||||
-Wno-attributes"
|
||||
-Wno-attributes \
|
||||
-Wno-error=unused-parameter"
|
||||
)
|
||||
if(NOT CMAKE_COMPILER_IS_GNUCXX)
|
||||
# -Wshadow is buggy and broken in GCC, so do not enable it.
|
||||
|
|
@ -542,7 +544,9 @@ if(USE_BUNDLED_OLM)
|
|||
Olm
|
||||
GIT_REPOSITORY https://gitlab.matrix.org/matrix-org/olm.git
|
||||
GIT_TAG 3.2.16
|
||||
PATCH_COMMAND git apply ${CMAKE_CURRENT_SOURCE_DIR}/third_party/olm-patches/0001-fix-list-const-ptr.patch
|
||||
PATCH_COMMAND git apply
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/third_party/olm-patches/0001-fix-list-const-ptr.patch
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/third_party/olm-patches/0002-fix-cmake-cmp0148.patch
|
||||
UPDATE_DISCONNECTED 1
|
||||
)
|
||||
set(OLM_TESTS OFF CACHE INTERNAL "")
|
||||
|
|
|
|||
|
|
@ -304,13 +304,16 @@ ApplicationWindow {
|
|||
}
|
||||
|
||||
ComboBox {
|
||||
id: notificationsCombo
|
||||
Layout.fillWidth: true
|
||||
model: [qsTr("Muted"), qsTr("Mentions only"), qsTr("All messages")]
|
||||
currentIndex: roomSettings.notifications
|
||||
onActivated: (index) => {
|
||||
roomSettings.changeNotifications(index);
|
||||
}
|
||||
Layout.fillWidth: true
|
||||
WheelHandler{} // suppress scrolling changing values
|
||||
|
||||
// Disable built-in wheel handling unless focused
|
||||
wheelEnabled: activeFocus
|
||||
}
|
||||
|
||||
Label {
|
||||
|
|
|
|||
|
|
@ -100,10 +100,13 @@ Rectangle {
|
|||
model: r.model.values
|
||||
currentIndex: r.model.value
|
||||
width: Math.min(implicitWidth, scroll.availableWidth - Nheko.paddingMedium)
|
||||
onActivated: r.model.value = currentIndex
|
||||
onActivated: {
|
||||
r.model.value = currentIndex
|
||||
}
|
||||
implicitContentWidthPolicy: ComboBox.WidestTextWhenCompleted
|
||||
|
||||
WheelHandler{} // suppress scrolling changing values
|
||||
// Disable built-in wheel handling unless focused
|
||||
wheelEnabled: activeFocus
|
||||
}
|
||||
}
|
||||
DelegateChoice {
|
||||
|
|
@ -118,7 +121,7 @@ Rectangle {
|
|||
onValueChanged: model.value = value
|
||||
editable: true
|
||||
|
||||
WheelHandler{} // suppress scrolling changing values
|
||||
wheelEnabled: activeFocus
|
||||
}
|
||||
}
|
||||
DelegateChoice {
|
||||
|
|
@ -153,7 +156,7 @@ Rectangle {
|
|||
return Number.fromLocaleString(locale, text) * spinbox.div
|
||||
}
|
||||
|
||||
WheelHandler{} // suppress scrolling changing values
|
||||
wheelEnabled: activeFocus
|
||||
}
|
||||
}
|
||||
DelegateChoice {
|
||||
|
|
@ -272,6 +275,5 @@ Rectangle {
|
|||
ToolTip.text: qsTr("Back")
|
||||
onClicked: mainWindow.pop()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
11
third_party/olm-patches/0002-fix-cmake-cmp0148.patch
vendored
Normal file
11
third_party/olm-patches/0002-fix-cmake-cmp0148.patch
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- CMakeLists.txt.orig 2026-01-25 20:50:49.905592647 -0500
|
||||
+++ CMakeLists.txt 2026-01-25 20:50:49.908925942 -0500
|
||||
@@ -1,4 +1,7 @@
|
||||
-cmake_minimum_required(VERSION 3.4)
|
||||
+cmake_minimum_required(VERSION 3.5)
|
||||
+if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.27")
|
||||
+ cmake_policy(SET CMP0148 OLD)
|
||||
+endif()
|
||||
|
||||
project(olm VERSION 3.2.16 LANGUAGES CXX C)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue