Skip to content

Commit

Permalink
change pin position
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroshihorie committed Feb 15, 2022
1 parent 5c5993e commit cfe736e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Shared/RoomView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,16 @@ struct RoomView: View {
.toolbar {
ToolbarItemGroup(placement: toolbarPlacement) {

#if os(macOS)
// Pin on top
Toggle(isOn: $pinned) {
Image(systemSymbol: pinned ? .pinFill : .pin)
.renderingMode(.original)
}.onChange(of: pinned) { newValue in
windowRef.level = newValue ? .floating : .normal
}
#endif

// VideoView mode switcher
Picker("Mode", selection: $appCtx.videoViewMode) {
Text("Fit").tag(VideoView.Mode.fit)
Expand Down Expand Up @@ -359,16 +369,6 @@ struct RoomView: View {
.renderingMode(.original)
}

#if os(macOS)
// Pin on top
Toggle(isOn: $pinned) {
Image(systemSymbol: pinned ? .pinFill : .pin)
.renderingMode(.original)
}.onChange(of: pinned) { newValue in
windowRef.level = newValue ? .floating : .normal
}
#endif

// Disconnect
Button(action: {
roomCtx.disconnect()
Expand Down

0 comments on commit cfe736e

Please sign in to comment.