wxDataViewCtrl on macOS doesn't draw a border by default. That is opposite of Win/GTK3 which does draw a border by default. Furthermore, if you pass in wxBORDER_DEFAULT it doesn't draw the correct native control border as expected.
Expect border to draw by default and be the native style. Observed no border is drawn.
The bug stems from (this line)[https://github.com/wxWidgets/wxWidgets/blob/23762d0c65b7cd013e4cf8b87869c882ac5a8d97/src/osx/cocoa/dataview.mm#L1989]. It should be looking at the style value coming in and turning on the scrollview border.
Furthermore, if you set wxBORDER_DEFAULT as the border it should turn on the border of the scrollview, not draw a custom border that isn't native which it is currently doing.
Create a data view like so:
tree_view = new wxDataViewCtrl(this, wxID_ANY, wxDefaultPosition, wxDefaultSize);
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
I have no idea why do we always disable the border here, apparently it has been done like this in the initial version of the code in e86edab (Add wxDataViewCtrl implementation for OSX/Cocoa (closes #10617: wxDataView for wxOSX-Cocoa), 2009-05-08).
Should we just remove the line calling setBorderType:? Does it look fine if you do it?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
If you remove setBorderType: no border is drawn. At the minimum to draw the native border you need [scrollview setBorderType:NSBezelBorder].
However, that will then interfere with non-native border drawing of wxWindow. It seems additional logic needs to be added to the border drawing of this control to handle the native border drawing.
Something like:
wxBORDER_THEME or wxBORDER_DEFAULT use the scrollview border.wxBORDER_NONE turn off the scrollview border.wxWindow handle the drawing of the non-native borders.—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
If you can make a PR implementing the working version, it would be great. TIA!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Sure thing, wxWidgetImpl::CreateListBox also has the same problem of missing borders I'll try and fix in the same way.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
I just noticed, wxListbox::Create() in listbox_osx.cpp is overriding the border property and making it sunken for whatever reason, any ideas why that would be? Seems like that should be removed; I'll remove it in my MR.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
I just noticed,
wxListbox::Create()inlistbox_osx.cppis overriding the border property and making it sunken for whatever reason, any ideas why that would be? Seems like that should be removed; I'll remove it in my MR.
Julian wrote this 69fa3d2 , I don't recall any specifics, perhaps it should rather be modified to set a reasonable type if wxBORDER_DEFAULT (=0) is passed in
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Julian wrote this 69fa3d2 , I don't recall any specifics, perhaps it should rather be modified to set a reasonable type if
wxBORDER_DEFAULT(=0) is passed in
With my MR both wxBORDER_DEFAULT and wxBORDER_THEME types now both use the native scrollview border which is what I would expect by default. IMHO there isn't really a need to change it to a different border style if the default is set (?). I suspect 69fa3d2 was done before Cocoa where the list view didn't have a border.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Closed #25560 as completed via 0bf7212.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()