Re: Gtk3 Scrolled Window's horizontal scrollbar not working properly
- From: Daniel Kasak <d j kasak dk gmail com>
- To: zentara <zzmiloschxx gmail com>
- Cc: gtk-perl mailing list <gtk-perl-list gnome org>
- Subject: Re: Gtk3 Scrolled Window's horizontal scrollbar not working properly
- Date: Wed, 25 Dec 2013 14:10:47 +1100
Here's the current project. I've bundled the as-yet-unreleased Gtk3::Ex::DBI::Datasheet, which does most of the work regarding the treeview. In this little app, it's not doing *that* much though - sets up the columns & renderers. I use Gtk3::Builder to lay out the GUI. I pass a the treeview into Gtk3::Ex::Datasheet::DBI and it sets it all up. Not really much else to say, other than at least in regards to Gtk2, I do mostly know what I'm doing ;) I create treeviews like this all the time in Gtk2. Anyway, there is no viewport in my builder file. The treeview is sitting directly in the scrolled window.
Unpack the tarball into your home folder. It will look for it's database in ~/.powercom. I've included a database. You should be able to run it by cd-ing into .powercom and running:
By default, if you don't define column definitions ( ie in this example app ), Gtk3::Ex::DBI::Datasheet will set them up with what it thinks are reasonable defaults. If you resize the window, the columns will also resize. I've also tried just now defining fixed-width columns. This doesn't help. To do this, add the 'fields' key in powercom::viewer:
$self->{readings} = Gtk3::Ex::DBI::Datasheet->new(
{
dbh => $self->{globals}->{db},
sql => {
# select => "id, reading_datetime, panel_1_voltage, accumulated_energy",
select => "*"
, from => "readings"
, order_by => "id"
},
treeview => $self->{form}->get_object( "readings_datasheet" ),
fields => [
{
name => "id",
, x_absolute => 100
}
, {
name => "serial_number"
, x_absolute => 100
}
, {
name => "reading_datetime"
, x_absolute => 100
}
, {
name => "heat_sink_temperature"
, x_absolute => 100
}
, {
name => "panel_1_volage"
, x_absolute => 100
}
, {
name => "panel_1_dc_voltage"
, x_absolute => 100
}
, {
name => "working_hours"
, x_absolute => 100
}
, {
name => "operating_mode"
, x_absolute => 100
}
, {
name => "tmp_f_value"
, x_absolute => 100
}
, {
name => "pv_1_f_value"
, x_absolute => 100
}
, {
name => "gfci_f_value"
, x_absolute => 100
}
, {
name => "fault_code_high"
, x_absolute => 100
}
, {
name => "fault_code_low"
, x_absolute => 100
}
, {
name => "line_current"
, x_absolute => 100
}
, {
name => "line_voltage"
, x_absolute => 100
}
, {
name => "ac_frequency"
, x_absolute => 100
}
, {
name => "ac_power"
, x_absolute => 100
}
, {
name => "zac"
, x_absolute => 100
}
, {
name => "accumulated_energy"
, x_absolute => 100
}
, {
name => "gfci_f_value_volts"
, x_absolute => 100
}
, {
name => "gfci_f_value_hz"
, x_absolute => 100
}
, {
name => "gz_f_value_ohm"
, x_absolute => 100
}
, {
name => "gfci_f_value"
, x_absolute => 100
}
],
}
);
By the way, Gtk3::Ex::DBI::Datasheet is not yet complete. I have to rewrite all the dialogs, and then do lots of testing.
If this looks too much for people to look into ( admittedly there's quite a bit going on under the covers ), I can try to produce a cut-down version with the same issue.
Dan
Attachment:
powercom.tar.bz2
Description: BZip2 compressed data
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]