Skip to content

Commit

Permalink
Use overlay instead of bold for hoverRule in ComplexModificationsView
Browse files Browse the repository at this point in the history
  • Loading branch information
tekezo committed Oct 1, 2024
1 parent 032b663 commit b3788cf
Showing 1 changed file with 23 additions and 15 deletions.
38 changes: 23 additions & 15 deletions src/apps/SettingsWindow/src/View/ComplexModificationsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,29 +88,37 @@ struct ComplexModificationsView: View {
}
}

Text(complexModificationRule.description)
.padding(.leading, 6.0)
.if(hoverRuleIndex == complexModificationRule.index) {
$0.font(.body.weight(.bold))
}
.if(!complexModificationRule.enabled) {
$0.foregroundColor(.gray)
}

Spacer()
HStack {
Text(complexModificationRule.description)
.frame(maxWidth: .infinity, alignment: .leading)
.if(!complexModificationRule.enabled) {
$0.foregroundColor(.gray)
}

if !complexModificationRule.enabled {
Text("disabled")
.foregroundColor(.gray)
if !complexModificationRule.enabled {
Text("disabled")
.foregroundColor(.gray)
}
}
.padding(.horizontal, 6.0)
.padding(.vertical, 2.0)
.if(hoverRuleIndex == ruleIndex) {
$0.overlay(
RoundedRectangle(cornerRadius: 2)
.stroke(
Color(NSColor(Color.accentColor)),
lineWidth: 1
)
)
}

HStack(alignment: .center, spacing: 10) {
Toggle(isOn: $complexModificationRule.enabled) {
Text("")
}
.switchToggleStyle()
.padding(.horizontal, 10.0)
.scaledToFit()
.padding(.trailing, 10.0)
.frame(width: 60)

Button(
action: {
Expand Down

0 comments on commit b3788cf

Please sign in to comment.