Skip to content

Commit

Permalink
Merge pull request #71 from 3colorr/v1.1.1
Browse files Browse the repository at this point in the history
V1.1.1
  • Loading branch information
3colorr authored Oct 1, 2023
2 parents f7641ee + 2cfaef2 commit f58e215
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 17 deletions.
26 changes: 21 additions & 5 deletions Mizuame/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ struct ContentView: View {
if isShowSavingMessage && !isExecutableSave {
Text("sitickynote.menu.message.saving")
.padding(.horizontal, 5)
.layoutPriority(1)
}

Spacer()
Expand Down Expand Up @@ -126,14 +127,29 @@ struct ContentView: View {
printer.doPrinting(content: stickyText)
}

Image(systemName: "gearshape.fill")
.foregroundColor(Color(bodyForegroundTheme))
.onTapGesture {
if #available(macOS 14, *) {
SettingsLink {
Image(systemName: "gearshape.fill")
.foregroundColor(Color(bodyForegroundTheme))
}
.buttonStyle(SettingsLinkStyle())
.onHover { _ in
isShowMessagebar = false
userAction = .NONE

delegate.showSettings()
}
// Not work.
// .onTapGesture {}

} else {
Image(systemName: "gearshape.fill")
.foregroundColor(Color(bodyForegroundTheme))
.onTapGesture {
isShowMessagebar = false
userAction = .NONE

delegate.showSettings()
}
}
}
.padding(EdgeInsets(top: 5, leading: 10, bottom: 5, trailing: 10))

Expand Down
11 changes: 0 additions & 11 deletions Mizuame/MizuameApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,6 @@ class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {

let menu = NSMenu()

// If the user don't agree terms of service and privacy policy,
// Mizuame don't show preferences.
if viewState == SettingsViewState.PREFERENCE.rawValue {
menu.addItem(
withTitle: NSLocalizedString("menubar.clickevent.right.menu.item.preference", comment: ""),
action: #selector(showSettings),
keyEquivalent: ""
)
menu.addItem(.separator())
}

menu.addItem(
withTitle: NSLocalizedString("menubar.clickevent.right.menu.item.quit", comment: ""),
action: #selector(quitApp),
Expand Down
2 changes: 1 addition & 1 deletion Mizuame/Settings/TabInfo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct TabInfo: View {
}

VStack(alignment: .leading, spacing: 5) {
Text("Version: 1.1.0").font(.body)
Text("Version: 1.1.1").font(.body)
Text("License: MIT license").font(.body)
HStack {
Text("settings.tab.info.src").font(.body)
Expand Down
16 changes: 16 additions & 0 deletions Mizuame/SettingsViewStyle.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// SettingsViewStyle.swift
// Mizuame
//
// Created by becomefoolish on 2023/09/30.
//

import SwiftUI

struct SettingsLinkStyle: ButtonStyle {

func makeBody(configuration: Configuration) -> some View {
configuration.label
.background(.clear)
}
}

0 comments on commit f58e215

Please sign in to comment.