Changeset f9d9e03 in subsurface


Ignore:
Timestamp:
Jan 1, 2017, 4:23:49 AM (5 months ago)
Author:
Miika Turkia <miika.turkia@…>
Branches:
master
Children:
3657cbe
Parents:
e89c2059
git-author:
Dirk Hohndel <dirk@…> (12/31/16 21:17:20)
git-committer:
Miika Turkia <miika.turkia@…> (01/01/17 04:23:49)
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 rf9d9e03  
    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.