| 1 | package Gapp::Toolbar; | ||
| 2 | { | ||
| 3 | $Gapp::Toolbar::VERSION = '0.60'; | ||
| 4 | } | ||
| 5 | |||
| 6 | use Moose; | ||
| 7 | use MooseX::SemiAffordanceAccessor; | ||
| 8 | extends 'Gapp::Container'; | ||
| 9 | with 'Gapp::Meta::Widget::Native::Role::HasIconSize'; | ||
| 10 | |||
| 11 | has '+gclass' => ( | ||
| 12 | default => 'Gtk2::Toolbar', | ||
| 13 | ); | ||
| 14 | |||
| 15 | sub BUILDARGS { | ||
| 16 | my $class = shift; | ||
| 17 | my %args = @_ == 1 && is_HashRef( $_[0] ) ? %{$_[0]} : @_; | ||
| 18 | |||
| 19 | for my $att ( qw(toolbar_style show_arrow tooltips orientation ) ) { | ||
| 20 | $args{properties}{$att} = delete $args{$att} if exists $args{$att}; | ||
| 21 | } | ||
| 22 | if ( exists $args{style} ) { | ||
| 23 | $args{properties}{'toolbar_style'} = $args{style}; | ||
| 24 | delete $args{style}; | ||
| 25 | } | ||
| 26 | |||
| 27 | __PACKAGE__->SUPER::BUILDARGS( %args ); | ||
| 28 | } | ||
| 29 | |||
| 30 | 1; | ||
| 31 | |||
| 32 | |||
| 33 | __END__ |