-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sort column highlighting should only be done when there is a header #347
Comments
The next nightly build will highlight columns with the SORTABLE attribute set only. |
I would like to seconds sofwarefailure's request, that the sort column should only be highlighted if column-headers are set to be visible. Is that also already fixed in the nightly build? |
My solution is slightly different, but the result should be the same. The highlighting will be applied for column with the SORTABLE attribute set, no matter whether there is a column title or not. If an application sets SORTABLE without MUIA_List_Title, then this is the fault of the application. |
The SORTABLE attribute makes absolutely no sense when you don't have a list title. SORTABLE just defines that a column's sort order can be changed by clicking its title button. So if you use SORTABLE without a list title then it is used wrong, because it cannot offer you the feature it implements. |
OK, thanks for clarifying this. |
Just don't set SORTABLE and do set ORDER to your preferred sort order, either ASC (default) or DESC. That's all. There is not as much magic as you might expect here. If you don't want the first column to be sorted you need to set MUIA_List_SortColumn to the desired column as well. The string supplied to MUIA_List_Format cannot transfer this information, it can only define how a column is sorted IF it is the current sort column. |
The problem is that this will crash on OS4. On a headerless listview, leaving out SORTABLE but setting ORDER will lead to a crash. See here: #348 Adding SORTABLE fixes the crash but of course SORTABLE should only be set when there's a header. Still, setting SORTABLE can be used as a workaround to prevent that crash which is why RapaGUI currently sets SORTABLE even if there is no header. Leaving out SORTABLE on a headerless listview will cause lots of trouble when using ORDER! Once again, see here: #348 |
@tboeckel Thanks for clarifying how this is supposed to be done. |
Take a look at the attached example. It sets column 2 as the sort column. The listview doesn't have any header. Still, it highlights column 2 as the sort column. I think this should only be done when there is a header because otherwise it looks weird.
main.txt
The text was updated successfully, but these errors were encountered: