App-DrivePlayer
view release on metacpan or search on metacpan
lib/App/DrivePlayer/GUI.pm view on Meta::CPAN
my $grid = Gtk3::Grid->new();
$grid->set_row_spacing(6);
$grid->set_column_spacing(8);
$grid->set_border_width(12);
$dlg->get_content_area()->add($grid);
# LRM (U+200E) is an invisible left-to-right marker. Prepending it to
# an Entry's text forces the internal PangoLayout's base direction to
# LTR, which keeps short RTL content (Arabic, Hebrew, â¦) flush with the
# left edge instead of the right. The glyphs within still render in
# their natural direction, so "راغب Ø¹ÙØ§Ù
Ø©" still looks correct.
# We strip the marker on read so it never reaches the DB or a query.
my $LRM = "\x{200E}";
my $put = sub {
my ($entry, $val) = @_;
$val //= '';
$entry->set_text(length $val ? $LRM . $val : '');
};
my $get = sub {
my ($entry) = @_;
my $v = $entry->get_text();
( run in 1.477 second using v1.01-cache-2.11-cpan-39bf76dae61 )