scrollbars QOL updates
This commit is contained in:
@@ -99,7 +99,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
CustomClippingRect {
|
||||
Item {
|
||||
id: entries
|
||||
|
||||
anchors.bottom: parent.bottom
|
||||
@@ -107,12 +107,12 @@ Item {
|
||||
anchors.top: search.bottom
|
||||
anchors.topMargin: Appearance.spacing.normal
|
||||
implicitWidth: Config.clipboard.sizes.width
|
||||
radius: Appearance.rounding.small
|
||||
|
||||
CustomListView {
|
||||
id: view
|
||||
|
||||
anchors.fill: parent
|
||||
cacheBuffer: (root.itemHeight + spacing) * 2
|
||||
highlightFollowsCurrentItem: false
|
||||
highlightRangeMode: ListView.ApplyRange
|
||||
preferredHighlightBegin: 0
|
||||
@@ -121,6 +121,7 @@ Item {
|
||||
|
||||
CustomScrollBar.vertical: CustomScrollBar {
|
||||
flickable: view
|
||||
minimumSize: 0.1
|
||||
}
|
||||
delegate: RowLayout {
|
||||
id: clipItem
|
||||
@@ -255,6 +256,12 @@ Item {
|
||||
ClipHistory.currentEntry = currentItem.modelData;
|
||||
ClipHistory.refreshPreview();
|
||||
}
|
||||
|
||||
CustomClippingWrapperRect {
|
||||
anchors.fill: parent
|
||||
child: view.contentItem
|
||||
radius: Appearance.rounding.small
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
CustomClippingRect {
|
||||
CustomRect {
|
||||
id: categoryContent
|
||||
|
||||
anchors.bottom: parent.bottom
|
||||
|
||||
@@ -1,25 +1,21 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import qs.Components
|
||||
import qs.Config
|
||||
import qs.Helpers
|
||||
|
||||
CustomClippingRect {
|
||||
Item {
|
||||
id: root
|
||||
|
||||
default property alias contentData: clayout.data
|
||||
|
||||
// Find and scroll to a section by its sectionId, then highlight a specific setting
|
||||
function scrollToSectionAndHighlight(sectionId: string, settingName: string): bool {
|
||||
// Find the section with matching sectionId
|
||||
for (let i = 0; i < clayout.children.length; i++) {
|
||||
const section = clayout.children[i];
|
||||
if (section.sectionId === sectionId) {
|
||||
// Scroll to the section with some padding
|
||||
const targetY = section.y - Appearance.padding.normal;
|
||||
flickable.contentY = Math.max(0, Math.min(targetY, flickable.contentHeight - flickable.height));
|
||||
|
||||
// Use the singleton to highlight the setting
|
||||
SettingsHighlight.highlight(settingName);
|
||||
return true;
|
||||
}
|
||||
@@ -27,7 +23,11 @@ CustomClippingRect {
|
||||
return false;
|
||||
}
|
||||
|
||||
radius: Appearance.rounding.normal - Appearance.padding.extraSmall
|
||||
CustomClippingWrapperRect {
|
||||
anchors.fill: parent
|
||||
child: flickable.contentItem
|
||||
radius: Appearance.rounding.normal - Appearance.padding.extraSmall
|
||||
}
|
||||
|
||||
CustomFlickable {
|
||||
id: flickable
|
||||
|
||||
Reference in New Issue
Block a user