paragui-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paragui-cvs] CVS: paragui/src/widgets pgwidget.cpp,1.4.4.14,1.4.4.15


From: Alexander Pipelka <address@hidden>
Subject: [paragui-cvs] CVS: paragui/src/widgets pgwidget.cpp,1.4.4.14,1.4.4.15
Date: Tue, 25 Mar 2003 06:10:32 -0500

Update of /cvsroot/paragui/paragui/src/widgets
In directory subversions:/tmp/cvs-serv21420/src/widgets

Modified Files:
      Tag: devel-1-0
        pgwidget.cpp 
Log Message:
SetSizeByText fix (Thanks H. C. <address@hidden>)



Index: pgwidget.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgwidget.cpp,v
retrieving revision 1.4.4.14
retrieving revision 1.4.4.15
diff -C2 -r1.4.4.14 -r1.4.4.15
*** pgwidget.cpp        11 Feb 2003 14:14:10 -0000      1.4.4.14
--- pgwidget.cpp        25 Mar 2003 11:10:30 -0000      1.4.4.15
***************
*** 1398,1413 ****
  void PG_Widget::SetSizeByText(int Width, int Height, const char *Text) {
        Uint16 w,h;
! 
        if (Text == NULL) {
                Text = my_text.c_str();
        }
  
!       if (PG_FontEngine::GetTextSize(Text, my_internaldata->font, &w, &h) != 
0) {
                return;
        }
  
-       //SizeWidget(w + Width, h + Height);
        my_width = w + Width;
!       my_height = h + Height;
  }
  
--- 1398,1413 ----
  void PG_Widget::SetSizeByText(int Width, int Height, const char *Text) {
        Uint16 w,h;
!       int baselineY;
!       
        if (Text == NULL) {
                Text = my_text.c_str();
        }
  
!       if (PG_FontEngine::GetTextSize(Text, my_internaldata->font, &w, &h, 
&baselineY) != 0) {
                return;
        }
  
        my_width = w + Width;
!       my_height = h + Height + baselineY;
  }
  





reply via email to

[Prev in Thread] Current Thread [Next in Thread]