Changeset 8889679 in subsurface


Ignore:
Timestamp:
Dec 31, 2016, 9:17:20 PM (12 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
3005d51
Parents:
76dfcdc
Message:

Mac: more generous margins for table columns

Fixes #974
Fixes #873

Signed-off-by: Dirk Hohndel <dirk@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • desktop-widgets/tableview.cpp

    r7be962b r8889679  
    136136int TableView::defaultColumnWidth(int col)
    137137{
     138        int width;
    138139        QString text = ui.tableView->model()->headerData(col, Qt::Horizontal).toString();
    139         return text.isEmpty() ? metrics.rm_col_width : defaultModelFontMetrics().width(text) + 4; // add small margin
     140        width = text.isEmpty() ? metrics.rm_col_width : defaultModelFontMetrics().width(text) + 4; // add small margin
     141#if defined(Q_OS_MAC)
     142        width += 10; // Mac needs more margin
     143#endif
     144        return width;
    140145}
    141146
Note: See TracChangeset for help on using the changeset viewer.