Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
alienator88 committed Dec 20, 2024
1 parent fc8ec4e commit daaf991
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 16 deletions.
33 changes: 23 additions & 10 deletions Pearcleaner/Logic/Styles.swift
Original file line number Diff line number Diff line change
Expand Up @@ -491,11 +491,11 @@ struct PearDropView: View {
VStack(alignment: .center, spacing: 0) {
HStack(spacing: 0) {
LinearGradient(gradient: Gradient(colors: [.green, .orange]), startPoint: .leading, endPoint: .trailing)
.frame(width: 220 * multiplier) // Adjust the width based on the multiplier
.frame(width: 175 * multiplier) // Adjust the width based on the multiplier
LinearGradient(gradient: Gradient(colors: [.orange, .primary.opacity(0.5)]), startPoint: .leading, endPoint: .trailing)
.frame(width: 10 * multiplier) // Adjust the width based on the multiplier
LinearGradient(gradient: Gradient(colors: [.primary.opacity(0.5), .primary.opacity(0.5)]), startPoint: .leading, endPoint: .trailing)
.frame(width: 300 * multiplier) // Adjust the width based on the multiplier
LinearGradient(gradient: Gradient(colors: [.primary.opacity(0.5)]), startPoint: .leading, endPoint: .trailing)
.frame(width: 250 * multiplier) // Adjust the width based on the multiplier
}
.mask(
Image("logo_text_small")
Expand All @@ -515,11 +515,11 @@ struct PearDropViewSmall: View {
VStack(alignment: .center, spacing: 0) {
HStack(spacing: 0) {
LinearGradient(gradient: Gradient(colors: [.green, .orange]), startPoint: .leading, endPoint: .trailing)
.frame(width: 260)
.frame(width: 60)
LinearGradient(gradient: Gradient(colors: [.orange, .primary.opacity(0.5)]), startPoint: .leading, endPoint: .trailing)
.frame(width: 10)
LinearGradient(gradient: Gradient(colors: [.primary.opacity(0.5), .primary.opacity(0.5)]), startPoint: .leading, endPoint: .trailing)
.frame(width: 300)
.frame(width: 100)
}
.mask(
Image("logo_text_small")
Expand Down Expand Up @@ -596,6 +596,8 @@ struct GlowGradientButton: View {


struct CustomPickerButton: View {
@EnvironmentObject var themeManager: ThemeManager

// Selected option binding to allow external state management
@Binding var selectedOption: CurrentPage
@Binding var isExpanded: Bool
Expand All @@ -620,8 +622,8 @@ struct CustomPickerButton: View {
VStack {
if isExpanded {
// Expanded menu with selectable options
VStack(alignment: .leading, spacing: 2) {
ForEach(options, id: \.title) { option in
VStack(alignment: .leading, spacing: 0) {
ForEach(Array(options.enumerated()), id: \.element.title) { index, option in
HStack {
Image(systemName: option.icon)
Text(option.title)
Expand All @@ -638,9 +640,9 @@ struct CustomPickerButton: View {
}

}
.padding(.vertical, 8)
.frame(maxWidth: 140, alignment: .leading)
// .padding(.vertical, 8)
.contentShape(Rectangle())
// .bounds(.blue)
.opacity(hoveredItem == option.title ? 0.7 : 1.0) // Change opacity on hover
.onTapGesture {
selectedOption = option // Update selected option
Expand All @@ -653,8 +655,18 @@ struct CustomPickerButton: View {
// Update hoveredItem based on whether this HStack is hovered
hoveredItem = isHovering ? option.title : nil
}

if index < options.count - 1 {
Divider()
.padding(.vertical, 8)
// .padding(.trailing, 23)
.opacity(0.3)
}

}
}
.frame(maxWidth: 140, alignment: .leading)
// .bounds()
} else {
// Display the selected option when collapsed
HStack {
Expand All @@ -671,7 +683,8 @@ struct CustomPickerButton: View {
}
}
.padding(isExpanded ? 10 : 0)
.background(.ultraThinMaterial)
.background(backgroundView(themeManager: themeManager, darker: true, glass: false))
// .background(.ultraThinMaterial)
.cornerRadius(8)
.overlay(
RoundedRectangle(cornerRadius: 8)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"color-space" : "display-p3",
"components" : {
"alpha" : "1.000",
"blue" : "0x50",
"green" : "0xC3",
"red" : "0x79"
"blue" : "0x57",
"green" : "0xE8",
"red" : "0x72"
}
},
"idiom" : "universal"
Expand All @@ -23,9 +23,9 @@
"color-space" : "display-p3",
"components" : {
"alpha" : "1.000",
"blue" : "0x50",
"green" : "0xC3",
"red" : "0x79"
"blue" : "0x57",
"green" : "0xE8",
"red" : "0x72"
}
},
"idiom" : "universal"
Expand Down
16 changes: 16 additions & 0 deletions Pearcleaner/Views/RegularMode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,22 @@ struct RegularMode: View {
}

}
// .background(
// Group {
// if appState.currentView == .empty {
// LinearGradient(
// gradient: Gradient(stops: [
// .init(color: .white.opacity(0.01), location: 0.5),
// .init(color: .clear, location: 0.5)
// ]),
// startPoint: .topLeading,
// endPoint: .bottomTrailing
// )
// }
// }
//
//
// )
.background(backgroundView(themeManager: themeManager))
.frame(minWidth: appState.currentPage == .orphans ? 700 : 900, minHeight: 600)
.edgesIgnoringSafeArea(.all)
Expand Down

0 comments on commit daaf991

Please sign in to comment.