aboutsummaryrefslogtreecommitdiff
path: root/src/FbWinFrame.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbWinFrame.cc')
-rw-r--r--src/FbWinFrame.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc
index 7a32353..cbcdbaf 100644
--- a/src/FbWinFrame.cc
+++ b/src/FbWinFrame.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: FbWinFrame.cc,v 1.70 2004/01/10 20:22:05 rathnor Exp $ 22// $Id: FbWinFrame.cc,v 1.71 2004/01/21 14:12:31 fluxgen Exp $
23 23
24#include "FbWinFrame.hh" 24#include "FbWinFrame.hh"
25 25
@@ -619,7 +619,7 @@ void FbWinFrame::configureNotifyEvent(XConfigureEvent &event) {
619} 619}
620 620
621void FbWinFrame::reconfigure() { 621void FbWinFrame::reconfigure() {
622 if (m_labelbuttons.size() == 0) 622 if (m_labelbuttons.empty())
623 return; 623 return;
624 624
625 m_bevel = theme().bevelWidth(); 625 m_bevel = theme().bevelWidth();
@@ -717,15 +717,14 @@ unsigned int FbWinFrame::buttonHeight() const {
717 aligns and redraws title 717 aligns and redraws title
718*/ 718*/
719void FbWinFrame::redrawTitle() { 719void FbWinFrame::redrawTitle() {
720 if (m_labelbuttons.size() == 0) 720 if (m_labelbuttons.empty())
721 return; 721 return;
722 722
723 int button_width = label().width()/m_labelbuttons.size(); 723 int button_width = label().width()/m_labelbuttons.size();
724 int rounding_error = label().width() - m_labelbuttons.size()*button_width; 724 int rounding_error = label().width() - m_labelbuttons.size()*button_width;
725 //!! TODO: bevel 725 //!! TODO: bevel
726 //int border_width = m_labelbuttons.front()->window().borderWidth(); 726 //int border_width = m_labelbuttons.front()->window().borderWidth();
727 int border_width = m_labelbuttons.size() != 0 ? 727 int border_width = m_labelbuttons.empty() ? 0 : m_labelbuttons.front()->borderWidth();
728 m_labelbuttons.front()->borderWidth() : 0;
729 728
730 LabelList::iterator btn_it = m_labelbuttons.begin(); 729 LabelList::iterator btn_it = m_labelbuttons.begin();
731 LabelList::iterator btn_it_end = m_labelbuttons.end(); 730 LabelList::iterator btn_it_end = m_labelbuttons.end();
@@ -799,7 +798,7 @@ void FbWinFrame::reconfigureTitlebar() {
799 798
800 // space left on titlebar between left and right buttons 799 // space left on titlebar between left and right buttons
801 unsigned int space_left = m_titlebar.width() - next_x; 800 unsigned int space_left = m_titlebar.width() - next_x;
802 if (m_buttons_right.size() != 0) 801 if (!m_buttons_right.empty())
803 space_left -= m_buttons_right.size() * (button_size + m_bevel); 802 space_left -= m_buttons_right.size() * (button_size + m_bevel);
804 803
805 space_left -= m_bevel; 804 space_left -= m_bevel;