diff --git a/Screenshot from 2024-11-03 12-22-14.png b/Screenshot from 2024-11-03 12-22-14.png deleted file mode 100644 index 062f227..0000000 Binary files a/Screenshot from 2024-11-03 12-22-14.png and /dev/null differ diff --git a/Screenshot from 2024-11-03 12-34-24.png b/Screenshot from 2024-11-03 12-34-24.png deleted file mode 100644 index 6f43569..0000000 Binary files a/Screenshot from 2024-11-03 12-34-24.png and /dev/null differ diff --git a/Screenshot from 2024-11-03 12-35-24.png b/Screenshot from 2024-11-03 12-35-24.png deleted file mode 100644 index b3bc5ec..0000000 Binary files a/Screenshot from 2024-11-03 12-35-24.png and /dev/null differ diff --git a/Screenshot from 2024-11-03 12-35-38.png b/Screenshot from 2024-11-03 12-35-38.png deleted file mode 100644 index 3f115c0..0000000 Binary files a/Screenshot from 2024-11-03 12-35-38.png and /dev/null differ diff --git a/Screenshot from 2024-11-09 02-27-43.png b/Screenshot from 2024-11-09 02-27-43.png new file mode 100644 index 0000000..d937fdf Binary files /dev/null and b/Screenshot from 2024-11-09 02-27-43.png differ diff --git a/Screenshot from 2024-11-09 02-27-57.png b/Screenshot from 2024-11-09 02-27-57.png new file mode 100644 index 0000000..1da5185 Binary files /dev/null and b/Screenshot from 2024-11-09 02-27-57.png differ diff --git a/Screenshot from 2024-11-09 02-28-06.png b/Screenshot from 2024-11-09 02-28-06.png new file mode 100644 index 0000000..5072edc Binary files /dev/null and b/Screenshot from 2024-11-09 02-28-06.png differ diff --git a/Screenshot from 2024-11-09 02-28-33.png b/Screenshot from 2024-11-09 02-28-33.png new file mode 100644 index 0000000..4afd2ac Binary files /dev/null and b/Screenshot from 2024-11-09 02-28-33.png differ diff --git a/Screenshot from 2024-11-09 02-28-47.png b/Screenshot from 2024-11-09 02-28-47.png new file mode 100644 index 0000000..7ccb754 Binary files /dev/null and b/Screenshot from 2024-11-09 02-28-47.png differ diff --git a/Screenshot from 2024-11-09 02-28-55.png b/Screenshot from 2024-11-09 02-28-55.png new file mode 100644 index 0000000..3de8e9d Binary files /dev/null and b/Screenshot from 2024-11-09 02-28-55.png differ diff --git a/images/roll-4.jpg b/images/roll-4.jpg new file mode 100644 index 0000000..68f960b Binary files /dev/null and b/images/roll-4.jpg differ diff --git a/lib/Exd/Gui/Instance.pm b/lib/Exd/Gui/Instance.pm index 7bce335..2286a2b 100644 --- a/lib/Exd/Gui/Instance.pm +++ b/lib/Exd/Gui/Instance.pm @@ -436,9 +436,12 @@ sub _create_popover_menu( $self, $box ) { $file_menu->append( 'Open', 'app.open.' . $self->instance_id ); $file_menu->append( 'Save', 'app.save.' . $self->instance_id ); $file_menu->append( 'Save as', 'app.save-as.' . $self->instance_id ); - $help_menu->append( 'About', 'app.about.' . $self->instance_id ); - $help_menu->append( 'Recommended printers and supplies', - 'app.good-printers.' . $self->instance_id ); + $help_menu->append( + 'Recommended printers and supplies', + 'app.good-printers.' . $self->instance_id + ); + $help_menu->append( 'About and contact', + 'app.about.' . $self->instance_id ); $menu_model->append_submenu( 'File', $file_menu ); $menu_model->append_submenu( 'Help', $help_menu ); my $popover = Gtk4::PopoverMenuBar->new_from_model($menu_model); @@ -448,97 +451,114 @@ sub _create_popover_menu( $self, $box ) { sub _show_recommended_printers($self) { my $win = Gtk4::Window->new; $win->set_title('Recommended printers and supplies'); - $win->set_default_size(1000, 700); + $win->set_default_size( 1000, 700 ); my $scroll = Gtk4::ScrolledWindow->new; - my $box = Gtk4::Box->new('vertical', 1); + my $box = Gtk4::Box->new( 'vertical', 1 ); $scroll->set_child($box); - my $explain = Gtk4::Label->new(undef); + my $explain = Gtk4::Label->new(undef); my @products = ( { - url => 'https://amzn.to/3V7oV7p', - country => 'USA', - description => 'Tested printer, uses standard protocol, advertised as only working by bluetooth but the model I got works by usb too. Perfectly supported', + url => 'https://amzn.to/3V7oV7p', + country => 'USA', + description => +'Tested printer, uses standard protocol, advertised as only working by bluetooth but the model I got works by usb too. Perfectly supported', image => 'images/printer-1.jpg', }, { - url => 'https://amzn.to/3ULFuFz', - country => 'USA', + url => 'https://amzn.to/3ULFuFz', + country => 'USA', description => 'Rolls of normal thermal papel', - image => 'images/roll-3.jpg', + image => 'images/roll-3.jpg', }, { - url => 'https://amzn.to/3O3DGEd', - country => 'Europe', - description => 'Advertised as having bluetooth and usb support, works fine, Perfectly supported', + url => 'https://amzn.to/3YHWT2Z', + country => 'USA', + description => 'Rolls of thermal stickers', + image => 'images/roll-4.jpg', + }, + { + url => 'https://amzn.to/48J48fR', + country => 'Europe', + description => +'Advertised as having bluetooth and usb support, works fine, Perfectly supported', image => 'images/printer-2.jpg', }, { - url => 'https://amzn.to/3YXWjj1', - country => 'Europe', - description => 'Tested printer, uses standard protocol, advertised as only working by bluetooth but the model I got works by usb too. Perfectly supported', + url => 'https://amzn.to/3YXWjj1', + country => 'Europe', + description => +'Tested printer, uses standard protocol, advertised as only working by bluetooth but the model I got works by usb too. Perfectly supported', image => 'images/printer-1.jpg', }, { - url => 'https://amzn.to/4elBYZC', - country => 'Europe', + url => 'https://amzn.to/4elBYZC', + country => 'Europe', description => 'Rolls of normal thermal papel', - image => 'images/roll-1.jpg', + image => 'images/roll-1.jpg', }, { - url => 'https://amzn.to/4eno7BK', - country => 'Europe', - description => 'Rolls of sticker thermal papel', - image => 'images/roll-2.jpg', + url => 'https://amzn.to/4eno7BK', + country => 'Europe', + description => 'Rolls of thermal stickers', + image => 'images/roll-2.jpg', }, ); $explain->set_markup( 'Recommended products: -I get a comission each time you buy one of those using these links.' +[PROMOTED CONTENT] I get a comission each time you buy one of those products using these links.' ); + $explain->set_halign('start'); $box->append($explain); for my $product (@products) { - my $product_box = Gtk4::Box->new('horizontal', 10); - my $image_file = path(__FILE__)->parent->parent->parent->parent->child($product->{image}); + my $product_box = Gtk4::Box->new( 'horizontal', 10 ); + my $image_file = path(__FILE__) + ->parent->parent->parent->parent->child( $product->{image} ); my $image = Gtk4::Image->new_from_file($image_file); $image->set_pixel_size(256); $product_box->append($image); - my $right_side_product_box = Gtk4::Box->new('vertical', 10); - my $label_available_in = Gtk4::Label->new(undef); + my $right_side_product_box = Gtk4::Box->new( 'vertical', 10 ); + my $label_available_in = Gtk4::Label->new(undef); $label_available_in->set_halign('start'); - $label_available_in->set_markup('Available in: '.$product->{country}.''); + $label_available_in->set_markup( + 'Available in: ' . $product->{country} . '' ); $right_side_product_box->append($label_available_in); my @lines = split /\n/, $product->{description}; - for (my $i = 0; 1 ; $i++) { - if (!($i < scalar @lines)) { + + for ( my $i = 0 ; 1 ; $i++ ) { + if ( !( $i < scalar @lines ) ) { last; } - my $line = $lines[$i]; - my $size_line = 60; - if (length $line > $size_line) { - splice @lines, $i, 1, substr($line, 0, $size_line), substr($line, $size_line); + my $line = $lines[$i]; + my $size_line = 85; + if ( length $line > $size_line ) { + splice @lines, $i, 1, substr( $line, 0, $size_line ), + substr( $line, $size_line ); } } $product->{description} = join "\n", @lines; - my $label_description = Gtk4::Label->new($product->{description}); + my $label_description = Gtk4::Label->new( $product->{description} ); $label_description->set_halign('start'); $right_side_product_box->append($label_description); my $buy_button = Gtk4::Button->new_with_label('Buy now'); + $buy_button->set_margin_end(60); $buy_button->set_halign('end'); - $buy_button->signal_connect(clicked => sub{ - my $launcher = Gtk4::UriLauncher->new( $product->{url} ); - $launcher->launch( $self->window, undef, undef ); - }); + $buy_button->signal_connect( + clicked => sub { + my $launcher = Gtk4::UriLauncher->new( $product->{url} ); + $launcher->launch( $self->window, undef, undef ); + } + ); + $buy_button->set_hexpand(1); $right_side_product_box->append($buy_button); $product_box->append($right_side_product_box); $box->append($product_box); } - $win->set_child($scroll); $win->set_transient_for( $self->window ); $win->present; diff --git a/me.sergiotarxz.Exd.metainfo.xml b/me.sergiotarxz.Exd.metainfo.xml index 5299503..8bb4608 100644 --- a/me.sergiotarxz.Exd.metainfo.xml +++ b/me.sergiotarxz.Exd.metainfo.xml @@ -30,7 +30,7 @@ - + Adding recommended products to use with the IDE
Adding recommended products to use with the IDE