diff options
author | Thomas Lübking <thomas.luebking@gmail.com> | 2016-08-04 13:20:35 (GMT) |
---|---|---|
committer | Thomas Lübking <thomas.luebking@gmail.com> | 2016-08-06 15:09:30 (GMT) |
commit | cc80230bd85dbaf1036b4cf37259d3146229fb00 (patch) | |
tree | e990270246cf1b07bf5eb6c6ba1ebcd71c9dd8b9 /src/IconButton.cc | |
parent | 59d9b0703ba8efb24893528f2eb9c84aaa8f5f83 (diff) | |
download | fluxbox-cc80230bd85dbaf1036b4cf37259d3146229fb00.zip fluxbox-cc80230bd85dbaf1036b4cf37259d3146229fb00.tar.bz2 |
expose a preferredWidth of *Button's
Diffstat (limited to 'src/IconButton.cc')
-rw-r--r-- | src/IconButton.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/IconButton.cc b/src/IconButton.cc index 4997365..4b0b423 100644 --- a/src/IconButton.cc +++ b/src/IconButton.cc | |||
@@ -279,3 +279,10 @@ bool IconButton::setOrientation(FbTk::Orientation orient) { | |||
279 | return false; | 279 | return false; |
280 | } | 280 | } |
281 | 281 | ||
282 | unsigned int IconButton::preferredWidth() const { | ||
283 | unsigned int r = TextButton::preferredWidth(); | ||
284 | if (m_icon_pixmap.drawable()) | ||
285 | r += m_icon_window.width() + 1; | ||
286 | return r; | ||
287 | } | ||
288 | |||