mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
Fix tool active position
This commit is contained in:
parent
57e0356c8e
commit
201ae0fde1
@ -107,17 +107,6 @@ struct VideoDetailsToolbar: View {
|
||||
.frame(width: 30, height: 30)
|
||||
.layoutPriority(1)
|
||||
|
||||
.background(
|
||||
GeometryReader { proxy in
|
||||
let frame = proxy.frame(in: .named("toolbarArea"))
|
||||
Color.clear
|
||||
.preference(key: RectKey.self, value: frame)
|
||||
.onPreferenceChange(RectKey.self) { rect in
|
||||
tool.wrappedValue.toolPostion = rect
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
if activeToolID == tool.wrappedValue.id,
|
||||
playerDetailsPageButtonLabelStyle.text,
|
||||
player.playerSize.width > 450
|
||||
@ -136,6 +125,16 @@ struct VideoDetailsToolbar: View {
|
||||
RoundedRectangle(cornerRadius: 10, style: .continuous)
|
||||
.fill(activeToolID == tool.wrappedValue.id ? Color.accentColor : Color.secondary)
|
||||
)
|
||||
.background(
|
||||
GeometryReader { proxy in
|
||||
let frame = proxy.frame(in: .named("toolbarArea"))
|
||||
Color.clear
|
||||
.preference(key: RectKey.self, value: frame)
|
||||
.onPreferenceChange(RectKey.self) { rect in
|
||||
tool.wrappedValue.toolPostion = rect
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
var visibleToolsCount: Int {
|
||||
|
Loading…
Reference in New Issue
Block a user