QskTreeView - #310
Conversation
| HOMEPAGE_URL "https://github.com/uwerat/qskinny" | ||
| VERSION 0.8.0) | ||
|
|
||
| if(MSVC) |
There was a problem hiding this comment.
- move/remove before merging
|
|
||
| qreal TreeBox::rowOffset( int row ) const | ||
| { | ||
| return ( row % 4 ) * 10; |
There was a problem hiding this comment.
In a real scenerio the user must provide usefull offsets for a valid tree structure
| { | ||
| return Cell; | ||
| } | ||
| return row % 2 == 0 ? Cell : QskAspect::NoSubcontrol; |
There was a problem hiding this comment.
@uwerat this is somewhat for keeping compatible, since in the previous implementation alternating color meant colored box node, no box node, colored box node, ...
|
|
||
| QskSkinStateChanger stateChanger( listView ); | ||
| stateChanger.setStates( listView->skinStates() | QskListView::Selected ); | ||
| boxNode = updateBoxNode( listView, boxNode, boxRect, subControl ); |
There was a problem hiding this comment.
this call to updateBoxNodecan fail such that it returns nullptr e.g. when the box color/gradient hint is transparent or the rectangle is empty
@uwerat maybe naming these functions to updateOrCreateBoxNode would help the communicate their behavior. Especially since we give the function a node pointer ( that can be nullptr ) and get a pointer back. Is a passed in non-null pointer always the returned pointer?
| } | ||
|
|
||
| const auto margins = listView->paddingHint( QskListView::Cell ); | ||
| const auto subControl = listView->rowSubControl(0); |
There was a problem hiding this comment.
- this must be fixed / handled per column
Relates to #309
Tree View
The core change for the styling are these functions:
./src/controls/QskListView.h