From c2019fe73c9d8a6d9783075ef3ab6ac2cffd20ed Mon Sep 17 00:00:00 2001 From: Yuval Shavit Date: Thu, 22 Sep 2022 00:03:36 -0400 Subject: [PATCH 1/3] fix mouseover highlight This fixes #307. --- whatdid/views/TextOptionsList.swift | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/whatdid/views/TextOptionsList.swift b/whatdid/views/TextOptionsList.swift index 2d11d2f4..ee838e5e 100644 --- a/whatdid/views/TextOptionsList.swift +++ b/whatdid/views/TextOptionsList.swift @@ -190,9 +190,11 @@ class TextOptionsList: WdView, TextFieldWithPopupContents { mouseoverHighlight = NSVisualEffectView() arrowSelectionHighlight = NSVisualEffectView() arrowSelectionHighlight.isEmphasized = true - arrowSelectionHighlight.state = .active - arrowSelectionHighlight.material = .selection - arrowSelectionHighlight.blendingMode = .behindWindow + for highlight in [mouseoverHighlight, arrowSelectionHighlight] { + highlight!.state = .active + highlight!.material = .selection + highlight!.blendingMode = .behindWindow + } textView.wantsLayer = true textView.drawsBackground = false From 02152e94dc0a9d3e6ec3ecd0220f43516ec08876 Mon Sep 17 00:00:00 2001 From: Yuval Shavit Date: Thu, 22 Sep 2022 00:06:21 -0400 Subject: [PATCH 2/3] fix gh action when merging to main --- .github/workflows/buildapp.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/buildapp.yml b/.github/workflows/buildapp.yml index c8d7c014..e8c7a270 100644 --- a/.github/workflows/buildapp.yml +++ b/.github/workflows/buildapp.yml @@ -18,10 +18,11 @@ jobs: python-version: 3.7 - name: Check actions to perform run: | + set -x if [[ -n '${{ secrets.APPLE_ID}}' ]]; then echo "should_notarize_app=yes" >> "$GITHUB_ENV" fi - if [[ "{{ github.event_name }}" == 'workflow_dispatch' || "{{ github.ref }}" == 'refs/heads/main' ]]; then + if [[ "${{ github.event_name }}" == 'workflow_dispatch' || "${{ github.ref }}" == 'refs/heads/main' ]]; then echo "should_upload_app=yes" >> "$GITHUB_ENV" fi - name: Will notarize From b6ea2d36181eb3c1ac3e0d15b277d52ba5ede9ac Mon Sep 17 00:00:00 2001 From: Yuval Shavit Date: Thu, 22 Sep 2022 00:07:22 -0400 Subject: [PATCH 3/3] remove justified alignment It looks bad :-p --- whatdid/views/TextOptionsList.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/whatdid/views/TextOptionsList.swift b/whatdid/views/TextOptionsList.swift index ee838e5e..fc00883b 100644 --- a/whatdid/views/TextOptionsList.swift +++ b/whatdid/views/TextOptionsList.swift @@ -179,7 +179,7 @@ class TextOptionsList: WdView, TextFieldWithPopupContents { let grafStyle = NSMutableParagraphStyle() grafStyle.setParagraphStyle(NSParagraphStyle.default) grafStyle.headIndent = 10.0 - grafStyle.alignment = .justified + grafStyle.alignment = .natural textView.defaultParagraphStyle = grafStyle heightConstraint = textView.heightAnchor.constraint(equalToConstant: 0)