Commit 2b1d4573 authored by Murray Cumming's avatar Murray Cumming
Browse files

Details: Do not make field widgets too wide, so this fits on a laptop screen.

* glom/utils_ui.cc: get_suitable_field_width_for_widget(): Do not add 150
to all calculated widths. I don't know why this code ever did that.
parent 48f98840
2010-03-06 Murray Cumming <murrayc@murrayc.com>
Details: Do not make field widgets too wide, so this fits on a laptop screen.
* glom/utils_ui.cc: get_suitable_field_width_for_widget(): Do not add 150
to all calculated widths. I don't know why this code ever did that.
1.13.7:
 
2010-02-28 Murray Cumming <murrayc@murrayc.com>
......
......@@ -340,7 +340,7 @@ static int get_width_for_text(Gtk::Widget& widget, const Glib::ustring& text)
int Utils::get_suitable_field_width_for_widget(Gtk::Widget& widget, const sharedptr<const LayoutItem_Field>& field_layout, bool or_title)
{
int result = 150;
int result = 150; //Suitable default.
const Field::glom_field_type field_type = field_layout->get_glom_type();
......@@ -394,7 +394,7 @@ int Utils::get_suitable_field_width_for_widget(Gtk::Widget& widget, const shared
if(!example_text.empty())
{
//Get the width required for this string in the current font:
result += get_width_for_text(widget, example_text);
result = get_width_for_text(widget, example_text);
}
if(or_title)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment