Revision: 13002
          http://sourceforge.net/p/skim-app/code/13002
Author:   hofman
Date:     2022-07-10 16:15:31 +0000 (Sun, 10 Jul 2022)
Log Message:
-----------
customize font well and line well accessibility, more like a color well.

Modified Paths:
--------------
    trunk/SKFontWell.m
    trunk/SKLineWell.h
    trunk/SKLineWell.m
    trunk/de.lproj/Localizable.strings
    trunk/en.lproj/Localizable.strings
    trunk/es.lproj/Localizable.strings
    trunk/fr.lproj/Localizable.strings
    trunk/it.lproj/Localizable.strings
    trunk/ja.lproj/Localizable.strings
    trunk/nl.lproj/Localizable.strings
    trunk/pl.lproj/Localizable.strings
    trunk/ru.lproj/Localizable.strings
    trunk/zh_CN.lproj/Localizable.strings
    trunk/zh_TW.lproj/Localizable.strings

Modified: trunk/SKFontWell.m
===================================================================
--- trunk/SKFontWell.m  2022-07-09 18:27:57 UTC (rev 13001)
+++ trunk/SKFontWell.m  2022-07-10 16:15:31 UTC (rev 13002)
@@ -542,4 +542,20 @@
     }
 }
 
+- (NSString *)accessibilityRoleDescription {
+    return NSLocalizedString(@"font well", @"Accessibility description");
+}
+
+- (id)accessibilityValue {
+    return [self title];
+}
+
+- (NSString *)accessibilityLabel {
+    return nil;
+}
+
+- (NSString *)accessibilityTitle {
+    return nil;
+}
+
 @end

Modified: trunk/SKLineWell.h
===================================================================
--- trunk/SKLineWell.h  2022-07-09 18:27:57 UTC (rev 13001)
+++ trunk/SKLineWell.h  2022-07-10 16:15:31 UTC (rev 13002)
@@ -54,7 +54,7 @@
     SKLineWellDisplayStyleOval
 };
 
-@interface SKLineWell : NSControl <NSDraggingSource, NSAccessibilityCheckBox> {
+@interface SKLineWell : NSControl <NSDraggingSource, NSAccessibilityButton> {
     CGFloat lineWidth;
     PDFBorderStyle style;
     NSArray *dashPattern;

Modified: trunk/SKLineWell.m
===================================================================
--- trunk/SKLineWell.m  2022-07-09 18:27:57 UTC (rev 13001)
+++ trunk/SKLineWell.m  2022-07-10 16:15:31 UTC (rev 13002)
@@ -619,11 +619,11 @@
 }
 
 - (NSString *)accessibilityRole {
-    return NSAccessibilityCheckBoxRole;
+    return NSAccessibilityButtonRole;
 }
 
 - (NSString *)accessibilityRoleDescription {
-    return NSAccessibilityRoleDescription(NSAccessibilityCheckBoxRole, nil);
+    return NSLocalizedString(@"line well", @"Accessibility description");
 }
 
 - (NSRect)accessibilityFrame {
@@ -635,17 +635,15 @@
 }
 
 - (id)accessibilityValue {
-    return [NSNumber numberWithInteger:[self isActive]];
+    if ([self style] == kPDFBorderStyleDashed)
+        return [NSString stringWithFormat:@"%@ %ld %@ %@", 
NSLocalizedString(@"line width", @"Accessibility description"), (long)[self 
lineWidth], NSLocalizedString(@"dashed", @"Accessibility description"), [[[self 
dashPattern] valueForKey:@"stringValue"] componentsJoinedByString:@" "]];
+    return [NSString stringWithFormat:@"%@ %ld", NSLocalizedString(@"line 
width", @"Accessibility description"), (long)[self lineWidth]];
 }
 
 - (NSString *)accessibilityLabel {
-    return [NSString stringWithFormat:@"%@ %ld", NSLocalizedString(@"line 
width", @"Accessibility description"), (long)[self lineWidth]];
+    return nil;
 }
 
-- (NSString *)accessibilityTitle {
-    return [NSString stringWithFormat:@"%@ %ld", NSLocalizedString(@"line 
width", @"Accessibility description"), (long)[self lineWidth]];
-}
-
 - (NSString *)accessibilityHelp {
     return [self toolTip];
 }
@@ -665,11 +663,6 @@
     return YES;
 }
 
-- (BOOL)accessibilityPerformPick {
-    [self performClick:self];
-    return YES;
-}
-
 - (id)accessibilityHitTest:(NSPoint)point {
     return NSAccessibilityUnignoredAncestor(self);
 }

Modified: trunk/de.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/en.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/es.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/fr.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/it.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/ja.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/nl.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/pl.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/ru.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/zh_CN.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/zh_TW.lproj/Localizable.strings
===================================================================
(Binary files differ)

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to