Skip to content

Commit c6d4201

Browse files
committed
Adjust UI
1 parent 6bfb0d1 commit c6d4201

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

Core/Sources/SuggestionWidget/ChatWindowView.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import ChatGPTChatTab
44
import ChatTab
55
import ComposableArchitecture
66
import SwiftUI
7+
import SharedUIComponents
78

89
private let r: Double = 8
910

@@ -21,13 +22,14 @@ struct ChatWindowView: View {
2122

2223
ChatTabBar(store: store)
2324
.frame(height: 26)
25+
.clipped()
2426

2527
Divider()
2628

2729
ChatTabContainer(store: store)
2830
.frame(maxWidth: .infinity, maxHeight: .infinity)
2931
}
30-
.xcodeStyleFrame(cornerRadius: 10)
32+
.xcodeStyleFrame()
3133
.ignoresSafeArea(edges: .top)
3234
.onChange(of: store.isPanelDisplayed) { isDisplayed in
3335
toggleVisibility(isDisplayed)

Core/Sources/SuggestionWidget/SuggestionPanelContent/CodeBlockSuggestionPanelView.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,13 @@ struct CodeBlockSuggestionPanelView: View {
277277
}
278278
.xcodeStyleFrame(cornerRadius: {
279279
switch suggestionPresentationMode {
280-
case .nearbyTextCursor: 6
281-
case .floatingWidget: nil
280+
case .nearbyTextCursor:
281+
if #available(macOS 26.0, *) {
282+
return 8
283+
} else {
284+
return 6
285+
}
286+
case .floatingWidget: return nil
282287
}
283288
}())
284289
}

Tool/Sources/SharedUIComponents/XcodeStyleFrame.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,19 @@ public struct XcodeLikeFrame<Content: View>: View {
2424
) // Add an extra border just incase the background is not displayed.
2525
.overlay(
2626
RoundedRectangle(cornerRadius: max(0, cornerRadius - 1), style: .continuous)
27-
.stroke(Color.white.opacity(0.2), style: .init(lineWidth: 1))
27+
.stroke(Color.white.opacity(0.1), style: .init(lineWidth: 1))
2828
.padding(1)
2929
)
3030
}
3131
}
3232

3333
public extension View {
3434
func xcodeStyleFrame(cornerRadius: Double? = nil) -> some View {
35-
XcodeLikeFrame(cornerRadius: cornerRadius ?? 10, content: self)
35+
if #available(macOS 26.0, *) {
36+
XcodeLikeFrame(cornerRadius: cornerRadius ?? 14, content: self)
37+
} else {
38+
XcodeLikeFrame(cornerRadius: cornerRadius ?? 10, content: self)
39+
}
3640
}
3741
}
3842

Version.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
APP_VERSION = 0.36.0
2-
APP_BUILD = 474
2+
APP_BUILD = 476
33
RELEASE_CHANNEL =
44
RELEASE_NUMBER = 1

0 commit comments

Comments
 (0)