2
Copyright (c) 2011-2016 elementary LLC (http://launchpad.net/elementary)
4
This program is free software: you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation, either version 3 of the License, or
7
(at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
14
You should have received a copy of the GNU General Public License
15
along with this program. If not, see <http://www.gnu.org/licenses/>.
19
/* Just a workarround Gtk.Entry which got a minimum fixed prefered width.
20
With XsEntry we can set the exact width we want */
21
public class Granite.Widgets.XsEntry : Gtk.Entry {
22
public int m_default_with = 25;
25
width_request = m_default_with;
28
public override void get_preferred_width (out int minimum_width, out int natural_width) {
29
if (width_request >= m_default_with)
30
minimum_width = natural_width = width_request;
32
minimum_width = natural_width = m_default_with;