Skip to content

Commit

Permalink
Merge branch 'feature' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ruittenb committed Oct 1, 2024
2 parents 585954c + 59d3acb commit 9131506
Show file tree
Hide file tree
Showing 26 changed files with 74 additions and 53 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
1.6.12: Update name in preferences when it changes.
1.6.11: Fix restart numbering by desktop
1.6.10: More friendly error dialog
1.6.9 : Fix corrupted installer disk image
Expand Down
8 changes: 4 additions & 4 deletions Spaceman.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1.6.11;
CURRENT_PROJECT_VERSION = 1.6.12;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"Spaceman/Preview Content\"";
DEVELOPMENT_TEAM = "";
Expand All @@ -476,7 +476,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 1.6.11;
MARKETING_VERSION = 1.6.12;
PRODUCT_BUNDLE_IDENTIFIER = dev.ruittenb.Spaceman;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -495,7 +495,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1.6.11;
CURRENT_PROJECT_VERSION = 1.6.12;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"Spaceman/Preview Content\"";
DEVELOPMENT_TEAM = "";
Expand All @@ -510,7 +510,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 1.6.11;
MARKETING_VERSION = 1.6.12;
PRODUCT_BUNDLE_IDENTIFIER = dev.ruittenb.Spaceman;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "SpaceIconBorderedNumInactive.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "Combined Shape.png",
"filename" : "NamedNormalActive.png",
"idiom" : "mac"
}
],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"images" : [
{
"filename" : "NamedNormalInactive.png",
"idiom" : "mac"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "Rectangle.png",
"filename" : "NumFullActive.png",
"idiom" : "mac"
}
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "Rectangle.png",
"filename" : "NumFullInactive.png",
"idiom" : "mac"
}
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "WideDis.png",
"filename" : "NumNormalActive.png",
"idiom" : "mac"
}
],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"images" : [
{
"filename" : "NumNormalInactive.png",
"idiom" : "mac"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}
15 changes: 0 additions & 15 deletions Spaceman/Assets.xcassets/SpaceManIconFullEn.imageset/Contents.json

This file was deleted.

15 changes: 0 additions & 15 deletions Spaceman/Assets.xcassets/SpaceManIconWide.imageset/Contents.json

This file was deleted.

12 changes: 6 additions & 6 deletions Spaceman/Helpers/IconCreator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ class IconCreator {
let iconResourceName: String
switch (s.isCurrentSpace, s.isFullScreen, spacemanStyle) {
case (true, true, .names):
iconResourceName = "NamedFullActive"
iconResourceName = "SpaceIconNamedFullActive"
case (false, true, .names):
iconResourceName = "NamedFullInactive"
iconResourceName = "SpaceIconNamedFullInactive"
case (true, true, .rects):
iconResourceName = "SpaceManIconFullEn"
iconResourceName = "SpaceIconNumFullActive"
case (false, true, .rects):
iconResourceName = "SpaceManIconFullDis"
iconResourceName = "SpaceIconNumFullInactive"
case (true, false, _):
iconResourceName = "SpaceManIcon"
iconResourceName = "SpaceIconNumNormalActive"
default:
// (true, true, .numbersAndNames)
// (false, true, .numbersAndNames)
iconResourceName = "SpaceManIconBorder"
iconResourceName = "SpaceIconNumNormalInactive"
}

icons.append(NSImage(imageLiteralResourceName: iconResourceName))
Expand Down
15 changes: 7 additions & 8 deletions Spaceman/View/PreferencesView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,13 @@ struct PreferencesView: View {
"Name (max 4 char.)",
text: Binding(
get: {prefsVM.spaceName},
set: {prefsVM.spaceName = $0.prefix(4).trimmingCharacters(in: .whitespacesAndNewlines)}),
onCommit: {}) // removed `updateName` callback so as to avoid unwanted writes

Button("Update name") {
updateName()
}
set: {
prefsVM.spaceName = $0.prefix(4).trimmingCharacters(in: .whitespacesAndNewlines)
updateName()
}

)
)
}
}

Expand Down Expand Up @@ -277,8 +278,6 @@ struct PreferencesView: View {
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "ButtonPressed"), object: nil)
}
}


}

struct ContentView_Previews: PreviewProvider {
Expand Down
2 changes: 1 addition & 1 deletion Spaceman/View/StatusBar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class StatusBar: NSObject, NSMenuDelegate {
shortcutKey = "0"
}

let icon = NSImage(imageLiteralResourceName: "SpaceManIcon")
let icon = NSImage(imageLiteralResourceName: "SpaceIconNumNormalActive")
let menuIcon = iconCreator.createRectWithNumberIcon(
icons: [icon],
index: 0,
Expand Down

0 comments on commit 9131506

Please sign in to comment.