Fix harmless unused parameter warning in wxOSX Add missing WXUNUSED(). Closes #25880.
Check that wxRibbonBar tab icon is valid before using it Using invalid item resulted in an assert, avoid it by checking if it is valid before using it. Also avoid calling GetIcon() and GetLogicalWidth() twice in a row by storing the result in a variable. Closes #25881. Co-authored-by: Vadim Zeitlin <va...@wxwidgets.org>
Improve padding when using HiDPI in generic wxDataViewCtrl It looked almost non-existent at 200%, so scale it with DPI to improve the control appearance. Closes #25882.
Fix compilation with wxUSE_OWNER_DRAWN==0 Add missing wxUSE_OWNER_DRAWN check to wxMenuItem code. Closes #25883.
Fix selecting individual columns with Ctrl-Click in wxGrid This didn't work correctly because the check if the column was already selected in wxGridColumnOperations::IsLineInSelection() used incorrect parameter order when calling IsInSelection(). Closes #25884.
... | ... | @@ -980,7 +980,7 @@ public: |
980 | 980 | { grid->DeselectCol(line); }
|
981 | 981 | |
982 | 982 | virtual bool IsLineInSelection(wxGrid *grid, int line) const override
|
983 | - { return grid->m_selection->IsInSelection(line, 0); }
|
|
983 | + { return grid->m_selection->IsInSelection(0, line); }
|
|
984 | 984 | |
985 | 985 | virtual wxGrid::EventResult SendEvent(wxGrid *grid, wxEventType eventType,
|
986 | 986 | int line, const wxMouseEvent& event) const override
|
... | ... | @@ -27,7 +27,7 @@ protected: |
27 | 27 | m_attrString(nullptr)
|
28 | 28 | {}
|
29 | 29 | |
30 | - void Parse(const wxFont& font, const wxString& markup)
|
|
30 | + void Parse(const wxFont& WXUNUSED(font), const wxString& markup)
|
|
31 | 31 | {
|
32 | 32 | const wxCFStringRef label(PrepareText(wxMarkupParser::Strip(markup)));
|
33 | 33 | m_attrString = [[NSMutableAttributedString alloc]
|
... | ... | @@ -2506,7 +2506,7 @@ wxBitmap wxDataViewMainWindow::CreateItemBitmap( unsigned int row, int &indent ) |
2506 | 2506 | if ( cell->PrepareForItem(model, item, column->GetModelColumn()) )
|
2507 | 2507 | {
|
2508 | 2508 | wxRect item_rect(x, 0, width, height);
|
2509 | - item_rect.Deflate(PADDING_RIGHTLEFT, 0);
|
|
2509 | + item_rect.Deflate(FromDIP(PADDING_RIGHTLEFT), 0);
|
|
2510 | 2510 | |
2511 | 2511 | // dc.SetClippingRegion( item_rect );
|
2512 | 2512 | cell->WXCallRender(item_rect, &dc, 0);
|
... | ... | @@ -2931,7 +2931,7 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) |
2931 | 2931 | }
|
2932 | 2932 | |
2933 | 2933 | wxRect item_rect = cell_rect;
|
2934 | - item_rect.Deflate(PADDING_RIGHTLEFT, 0);
|
|
2934 | + item_rect.Deflate(FromDIP(PADDING_RIGHTLEFT), 0);
|
|
2935 | 2935 | |
2936 | 2936 | // account for the tree indent (harmless if we're not indented)
|
2937 | 2937 | item_rect.x += indent;
|
... | ... | @@ -6158,7 +6158,7 @@ unsigned int wxDataViewCtrl::GetBestColumnWidth(int idx) const |
6158 | 6158 | |
6159 | 6159 | int max_width = calculator.GetMaxWidth();
|
6160 | 6160 | if ( max_width > 0 )
|
6161 | - max_width += 2 * PADDING_RIGHTLEFT;
|
|
6161 | + max_width += 2 * FromDIP(PADDING_RIGHTLEFT);
|
|
6162 | 6162 | |
6163 | 6163 | const_cast<wxDataViewCtrl*>(this)->m_colsBestWidths[idx].width = max_width;
|
6164 | 6164 | return max_width;
|
... | ... | @@ -733,12 +733,14 @@ void wxMenuItem::DoSetBitmap(const wxBitmapBundle& bmpNew, bool bChecked) |
733 | 733 | |
734 | 734 | void wxMenuItem::SetupBitmaps()
|
735 | 735 | {
|
736 | +#if wxUSE_OWNER_DRAWN
|
|
736 | 737 | // Owner-drawn items must not return valid bitmaps even if they have them,
|
737 | 738 | // this somehow breaks the item measuring logic and the menu may not become
|
738 | 739 | // wide enough to accommodate the items text, so just don't do anything at
|
739 | 740 | // all for them here.
|
740 | 741 | if ( IsOwnerDrawn() )
|
741 | 742 | return;
|
743 | +#endif // wxUSE_OWNER_DRAWN
|
|
742 | 744 | |
743 | 745 | const int itemPos = MSGetMenuItemPos();
|
744 | 746 | if ( itemPos == -1 )
|
... | ... | @@ -1490,8 +1490,13 @@ void wxRibbonMSWArtProvider::DrawTab( |
1490 | 1490 | int x = tab.rect.x + 3;
|
1491 | 1491 | if(m_flags & wxRIBBON_BAR_SHOW_PAGE_ICONS)
|
1492 | 1492 | {
|
1493 | - x += 3 + tab.page->GetIcon().GetLogicalWidth();
|
|
1494 | - width -= 3 + tab.page->GetIcon().GetLogicalWidth();
|
|
1493 | + const wxBitmap& icon = tab.page->GetIcon();
|
|
1494 | + if (icon.IsOk())
|
|
1495 | + {
|
|
1496 | + const int iconWidth = icon.GetLogicalWidth();
|
|
1497 | + x += 3 + iconWidth;
|
|
1498 | + width -= 3 + iconWidth;
|
|
1499 | + }
|
|
1495 | 1500 | }
|
1496 | 1501 | int y = tab.rect.y + (tab.rect.height - text_height) / 2;
|
1497 | 1502 |
—
View it on GitLab.
You're receiving this email because of your account on gitlab.com. Manage all notifications · Help