diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-12-08 20:13:09 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-12-08 20:23:14 +0100 |
| commit | e06d1831abc6786933db935f298c8a4e8e76e599 (patch) | |
| tree | 56a7f6b29f6fd774ce1ddedf4629e6156c6591b7 /src/wx/wx_util.cc | |
| parent | 942f2c6ae6be33fb17ec46931bbe071a9d2e6f17 (diff) | |
Shrink some big buttons.
Diffstat (limited to 'src/wx/wx_util.cc')
| -rw-r--r-- | src/wx/wx_util.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc index 758d57a80..7948dd13c 100644 --- a/src/wx/wx_util.cc +++ b/src/wx/wx_util.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2019 Carl Hetherington <cth@carlh.net> + Copyright (C) 2012-2020 Carl Hetherington <cth@carlh.net> This file is part of DCP-o-matic. @@ -592,3 +592,14 @@ bitmap_path (string name) return std_to_wx (p.string()); } + +wxSize +small_button_size (wxWindow* parent, wxString text) +{ + wxClientDC dc (parent); + wxSize size = dc.GetTextExtent (text); + size.SetHeight (-1); + size.IncBy (24, 0); + return size; +} + |
