Frederik Carlier
892ed4877e
NSBox: (re-)implement isOpaque ( #254 )
...
This (re-)implements logic where a box is marked
as opaque if it is a custom box which is not
transparent, but moves the logic to `GSTheme`,
allowing themes to override this loggic.
This fixes the rendering of custom boxes with a
custom fill color; the current implementation
would mark them as non-opaque and hence the fill
color would not be rendered.
- The original implementation (from 1999) always
returned `YES`
(53bcb50240
)
- A more complete implementation was backported
from the Testplant branch in 2012
(e85b16bc05
, by
@fredkiefer, upstream commit
36e77b95f7
)
- More recently, the a return value of `NO` was
hardcoded
(02bc49e2d5
, by
@ericwa)
2024-04-04 22:23:14 +02:00
Frederik Carlier
95f302442c
NSBox: decode NSBorderColor2 and NSFillColor2 ( #255 )
2024-04-04 20:34:42 +02:00
Frederik Carlier
85b8a3e495
[NSTableView initWithCoder]: Read alternatingRowBackgroundColors, from tableViewFlags ( #252 )
...
* [NSTableView initWithCoder]: Read alternatingRowBackgroundColors, from tableViewFlags
* [NSTableView _numRows]: Check _tableColumns is not empty
* [NSTableView encodeWithCoder]: add autosaveTableColumns, usesAlternatingRowBackgroundColors
2024-04-03 23:54:10 +02:00
Frederik Carlier
059d13f5ab
highlightTableViewSelection: Always use default selection color if not set. ( #253 )
...
The current implementation will attempt to assign a default value for selectionColor if backgroundColor is white. There's two issues with that:
1. `backgroundColor` is likely in the `NSNamedColorSpace`, whereas it is being compared to `[NSColor whiteColor]`, which is in the `NSCalibratedWhiteColorSpace`. That comparision will always return false.
2. Users will probably expect the selected item to be highlighted in a different color even if the background color is not white. For example, the consider a scenario where the default background color is white, and the alternate background color is grey. It makes sense to always highlight the selected row in blue. This aligns with the behavior when `highlightedTableRowBackgroundColor` is defined.
2024-04-03 23:43:33 +02:00
Frederik Carlier
f46accfa9c
GSXib5KeyedUnarchiver: Add mapping for NSSegmentItemLabel, NSSegmentItemImage ( #251 )
2024-04-03 23:24:22 +02:00
Frederik Carlier
c6082e31db
NSGraphicsContext: Suppress incompatible pointer type warning ( #250 )
...
```
NSGraphicsContext.m:349:50: warning: incompatible pointer types sending 'Class' to parameter of type 'id<NSCopying>' [-Wincompatible-pointer-types]
methods = [[classMethodTable objectForKey: [self class]] pointerValue];
^~~~~~~~~~~~
/usr/local/include/Foundation/NSDictionary.h:115:26: note: passing argument to parameter 'aKey' here
(GS_GENERIC_TYPE(KeyT))aKey; // Primitive
^
NSGraphicsContext.m:354:37: warning: incompatible pointer types sending 'Class' to parameter of type 'id<NSCopying>' [-Wincompatible-pointer-types]
forKey: [self class]];
^~~~~~~~~~~~
```
2024-04-01 22:54:57 +02:00
Frederik Carlier
c50123f870
GSTextStorage: Add function prototypes ( #249 )
...
Add a function prototype for:
- `addImp` (`(void)addObject:(ObjectType)anObject`)
- `insImp` (`(void)insertObject:(ObjectType)anObject atIndex:(NSUInteger)index`)
- `remImp` (`(void)removeObject:(ObjectType)anObject`)
- cntImp (`count`)
Fixes warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
2024-04-01 22:53:23 +02:00
Frederik Carlier
4470a157d7
Remove unused variables ( #247 )
...
Fixes a compiler warnings
2024-04-01 21:05:46 +02:00
Frederik Carlier
1c26da1f27
NSInterfaceStyle: Fix void-pointer-to-enum-cast warning ( #248 )
...
Cast to `uintptr_t` before casting to `enum` to suppress warning.
```
NSInterfaceStyle.m:134:15: warning: cast to smaller integer type 'NSInterfaceStyle' from 'void *' [-Wvoid-pointer-to-enum-cast]
style = (NSInterfaceStyle)NSMapGet(styleMap, key);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NSInterfaceStyle.m:234:24: warning: cast to smaller integer type 'NSInterfaceStyle' from 'void *' [-Wvoid-pointer-to-enum-cast]
if (newStyle != ((NSInterfaceStyle)val))
^~~~~~~~~~~~~~~~~~~~~
```
2024-04-01 16:49:46 +02:00
Frederik Carlier
2372b76cc8
This commits updates the libs-gui build process to generate a gnustep-gui.pc file which is installed in /lib/pkgconfig and contains the GNUstep gui version number, the libraries to link (equivalent to gnustep-config --gui-libs) with and the C flags to use (equivalent to gnustep-config --objc-flags). ( #246 )
...
This can be useful when linking with libs-gui in projects which don't use the GNUstep build system.
2024-03-27 23:39:23 +01:00
Fred Kiefer
c12fdd26f7
Set delegate of NSTextView to nil in dealloc.
2024-03-26 22:53:44 +01:00
Fred Kiefer
a054b21355
* Source/NSTextView.m: Add support for NSFilenamenPboardType.
...
Change by OnFlApp (https://githup.com/onflapp )
2024-03-18 22:53:46 +01:00
OnFlApp
1e956c96df
NSTextView: support drop for NSFilenamesPboardType ( #156 )
...
* NSTextView: support drop for NSFilenamesPboardType
* code cleanup
* code fixes
2024-03-18 22:35:29 +01:00
rfm
324308b4e8
fixup error in pasteboard types provided when png is available
2024-03-04 22:08:00 +00:00
Riccardo
7a215fcb01
Magick fix ( #244 )
...
* Fix include for ImageMagick 7
* add version test for MagickCore and conditionally include the path to MagickCore.h
* autoreconf with 2.69
2024-02-29 09:26:24 +01:00
rfm
cff4f39db3
Set timeout for pasteboard to 30 seconds rather than 2 (for slow providers).
2024-02-20 10:10:32 +00:00
Sergei Golovin
53cb373976
Support tab renaming in terminal ( #243 )
...
* add missed methods declarations to GSTheme.h
* style tweaks
2024-02-19 09:11:56 +01:00
Gregory Casamento
580150a8c1
Merge pull request #240 from ethanc8/ethanc8-2
...
Implement various trivial methods required by GitUp
2024-02-10 16:10:21 -05:00
ethanc8
9202dfeece
Implement -appearannce, -setAppearance: and -effectiveApperance for NSView
2024-02-10 12:25:59 -06:00
ethanc8
501e38db7f
Use @property(retain) instead of @property(strong)
2024-02-09 15:44:20 -06:00
Frederik Carlier
13f2f5e792
Make PACKAGE_SCOPE @public on MinGW ( #242 )
2024-02-06 21:07:59 +01:00
ethanc8
adba87cb51
Move NSModalResponse and GSNSWindowDidEndSheetCallbackBlock to NSWindow.h
2024-02-05 16:04:05 -06:00
ethanc8
b1a476801a
Remove @class NSApperance; from NSView.h since we already imported NSAppearance.h
2024-02-05 15:36:06 -06:00
ethanc8
12ca9f6996
Stylistic fixes for -[NSAppearance effectiveAppearance]
2024-02-05 15:27:03 -06:00
ethanc8
9db91f702e
Rename the new NSScroller methods to the names used by Apple
2024-02-05 15:26:42 -06:00
ethanc8
61c9699021
Re-add layout code that was mistakenly removed
2024-02-05 14:43:31 -06:00
ethanc8
882de64435
Add required import to NSView.h
2024-01-06 13:21:03 -06:00
ethanc8
80fa9c9deb
Add new names for NSEventType.
2023-12-31 20:05:41 -06:00
ethanc8
5384815d53
Add new names for NSBackgroundStyle.
2023-12-31 20:05:24 -06:00
ethanc8
a91815f70a
Add scroller styling options.
2023-12-31 20:05:11 -06:00
ethanc8
2303052e50
Add NSAppearanceCustomization to NSApplication and NSView
2023-12-31 20:03:21 -06:00
ethanc8
6aff0bd0f8
Add -[NSMenu popUpMenuPositioningItem:atLocation:inView:]
2023-12-31 19:27:38 -06:00
ethanc8
157695e2cb
Add new names for NSEventModifierFlags from macOS 10.12
2023-12-31 19:24:12 -06:00
ethanc8
affa447f7d
Declare <NSSplitViewDelegate> as a protocol instead of a category.
2023-12-31 19:19:29 -06:00
ethanc8
24908dc0f3
Add IDE files to .gitignore
2023-12-31 17:38:01 -06:00
ethanc8
ea6c43911f
Add beginSheet:completionHandler:-related methods:
...
-[NSWindow beginSheet:completionHandler:]
-[NSAlert beginSheetModalForWindow:completionHandler:]
2023-12-31 17:37:07 -06:00
Gregory John Casamento
969fe4c870
Add getting, additional change from branch, quick fix
2023-12-28 11:20:12 -05:00
Gregory Casamento
a5f92ecb8b
Merge pull request #233 from gnustep/NSShadow_issue217_nsgraphicscontext
2023-12-28 11:18:14 -05:00
Fred Kiefer
3a6dce02be
Remove some gcc compiler warnings
2023-12-28 14:45:16 +01:00
Fred Kiefer
7fce63432a
* Documentation/manual/AppKit.texi: Move table of contents outside
...
of title page. This fixes building the documentation with newer texinfo.
2023-12-28 13:53:41 +01:00
Gregory John Casamento
9fab419042
Add shadow method to NSGraphicsContext and add set method to NSShadow
2023-12-28 06:47:25 -05:00
Gregory John Casamento
345b1b4065
Add call to setter as suggested by @fredkiefer
2023-12-27 12:37:33 -05:00
Gregory Casamento
79fd2c8c43
Merge pull request #229 from gnustep/NSShadow_implementation_issue217
...
Update NSView with setShadow:/shadow methods
2023-12-27 12:26:21 -05:00
Gregory John Casamento
7be6c722e4
Add RETAIN, per review from @fredkiefer
2023-12-27 12:20:54 -05:00
Gregory John Casamento
874515c5b7
Add RETAIN, per review from @fredkiefer
2023-12-27 12:19:48 -05:00
Gregory John Casamento
ff90453263
Fix indentation issue and remove uneeded local var, per review from @fredkiefer
2023-12-27 12:17:48 -05:00
Gregory John Casamento
d98a52924e
Update ChangeLog with latest additions
2023-12-27 10:18:45 -05:00
Gregory John Casamento
4e4755c533
Remove uneeded comments
2023-12-26 11:53:38 -05:00
Gregory John Casamento
cb4987ff47
Minor cleanup in NSView, add code to get NSShadowHoriz, NSShadowVert
2023-12-26 11:43:33 -05:00
Gregory John Casamento
702f7bb9af
Untabify, add shadow keys for vert, color, horiz
2023-12-26 10:32:46 -05:00