Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=fwsetup-ng.git;a=commitdiff;h=5083dbc1e93f42c9850328001adae25150b77c19
commit 5083dbc1e93f42c9850328001adae25150b77c19 Author: James Buren <[email protected]> Date: Sat Aug 18 23:21:15 2012 -0500 convert newt button measuring functions to C++ diff --git a/Utility.cc b/Utility.cc index aecfce4..6b5f7db 100644 --- a/Utility.cc +++ b/Utility.cc @@ -90,4 +90,16 @@ bool get_text_size(const string &text,int &width,int &height) return true; } + +bool get_button_size(const string &text,int &width,int &height) +{ + if(!get_text_size(text,width,height)) + return false; + + width += 5; + + height += 3; + + return true; +} #endif diff --git a/Utility.hh b/Utility.hh index e4e1b95..7e47a85 100644 --- a/Utility.hh +++ b/Utility.hh @@ -9,4 +9,5 @@ pid_t execute(const string &cmd); #ifdef NEWT bool get_text_size(const string &text,int &width,int &height); +bool get_button_size(const string &text,int &width,int &height); #endif _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
