mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 13:37:11 +00:00
Fix the overlapping scrollbars on macOS. (#3646)
This commit is contained in:
parent
536f01abbd
commit
b8106f36ba
@ -12,6 +12,10 @@ struct RoomListFiltersView: View {
|
||||
@Binding var state: RoomListFiltersState
|
||||
@Namespace private var namespace
|
||||
|
||||
/// When you connect a mouse on macOS the scrollbars aren't hidden. This is some extra padding
|
||||
/// applied to the scroll view content to make sure the bars don't overlap the filters.
|
||||
private var macScrollBarPadding: CGFloat { ProcessInfo.processInfo.isiOSAppOnMac ? 16 : 0 }
|
||||
|
||||
var body: some View {
|
||||
ScrollViewReader { proxy in
|
||||
ScrollView(.horizontal) {
|
||||
@ -39,11 +43,13 @@ struct RoomListFiltersView: View {
|
||||
.matchedGeometryEffect(id: filter.id, in: namespace)
|
||||
}
|
||||
}
|
||||
.padding(.horizontal, 16)
|
||||
.padding(.bottom, macScrollBarPadding)
|
||||
}
|
||||
}
|
||||
.scrollIndicators(.hidden)
|
||||
.padding(.leading, 16)
|
||||
.padding(.vertical, 12)
|
||||
.padding(.bottom, -macScrollBarPadding)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user