Skip to content

Commit b6a3667

Browse files
committed
FIXED: Wrong alignment of editing windows in inline editing mode.
Since the coordinate system of the GTK component has changed under the current multi-tab architecture, the calculation of the input starting position needs to be modified simultaneously.
1 parent 749730a commit b6a3667

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

lib/App/Asciio/GTK/Asciio/Dialogs.pm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,15 +327,14 @@ $text_heigh =max($text_heigh, 3) ;
327327

328328
my ($character_width, $character_height) = $asciio->get_character_size() ;
329329
my ($root_x, $root_y) = $asciio->get_window()->get_origin() ;
330-
my ($v_value, $h_value) = ($asciio->{vadjustment}->get_value(), $asciio->{hadjustment}->get_value()) ;
331330

332331
my $window = new Gtk3::Window() ;
333332

334333
my $dialog = Gtk3::Dialog->new($title, $window, 'destroy-with-parent') ;
335334
$dialog->set_default_size ($text_width, $text_heigh) ;
336335
$dialog->set_border_width(0) ;
337336
$dialog->set_decorated(0) ;
338-
$dialog->move($root_x+(($X+$text_begin_x)*$character_width)-$h_value, $root_y+(($Y+$text_begin_y)*$character_height)-$v_value) ;
337+
$dialog->move($root_x+(($X+$text_begin_x)*$character_width), $root_y+(($Y+$text_begin_y)*$character_height)) ;
339338

340339
my $vbox = Gtk3::VBox->new(FALSE, 5) ;
341340
$vbox->pack_start(Gtk3::Label->new(""), FALSE, FALSE, 0) ;

lib/App/Asciio/GTK/Asciio/stripes/editable_box2.pm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,15 +164,14 @@ my $final_heigh = $text_heigh + $title_heigh + 1;
164164

165165
my ($character_width, $character_height) = $asciio->get_character_size() ;
166166
my ($root_x, $root_y) = $asciio->get_window()->get_origin() ;
167-
my ($v_value, $h_value) = ($asciio->{vadjustment}->get_value(), $asciio->{hadjustment}->get_value());
168167

169168
my $window = new Gtk3::Window() ;
170169

171170
my $dialog = Gtk3::Dialog->new('Box attributes', $window, 'destroy-with-parent') ;
172171
$dialog->set_default_size($final_width, $final_heigh);
173172
$dialog->set_border_width(0);
174173
$dialog->set_decorated(0);
175-
$dialog->move($root_x+(($X+$text_begin_x)*$character_width)-$h_value, $root_y+(($Y+$text_begin_y)*$character_height)-$v_value);
174+
$dialog->move($root_x+(($X+$text_begin_x)*$character_width), $root_y+(($Y+$text_begin_y)*$character_height));
176175

177176
my $vbox = Gtk3::VBox->new(FALSE, $character_height);
178177
$vbox->add(Gtk3::Label->new (""));

lib/App/Asciio/GTK/Asciio/stripes/ellipse.pm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,15 +140,14 @@ $text_heigh = max($text_heigh, 3) ;
140140

141141
my ($character_width, $character_height) = $asciio->get_character_size() ;
142142
my ($root_x, $root_y) = $asciio->get_window()->get_origin() ;
143-
my ($v_value, $h_value) = ($asciio->{vadjustment}->get_value(), $asciio->{hadjustment}->get_value());
144143

145144
my $window = new Gtk3::Window() ;
146145

147146
my $dialog = Gtk3::Dialog->new('Ellips attributes', $window, 'destroy-with-parent') ;
148147
$dialog->set_default_size($text_width, $text_heigh);
149148
$dialog->set_border_width(0);
150149
$dialog->set_decorated(0);
151-
$dialog->move($root_x+(($X+$text_x)*$character_width)-$h_value, $root_y+(($Y+$text_y)*$character_height)-$v_value);
150+
$dialog->move($root_x+(($X+$text_x)*$character_width), $root_y+(($Y+$text_y)*$character_height));
152151

153152
my $vbox = Gtk3::VBox->new(FALSE, 5);
154153
$vbox->add(Gtk3::Label->new (""));

lib/App/Asciio/GTK/Asciio/stripes/rhombus.pm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,14 @@ $text_heigh = max($text_heigh, 3) ;
120120

121121
my ($character_width, $character_height) = $asciio->get_character_size() ;
122122
my ($root_x, $root_y) = $asciio->get_window()->get_origin() ;
123-
my ($v_value, $h_value) = ($asciio->{vadjustment}->get_value(), $asciio->{hadjustment}->get_value());
124123

125124
my $window = new Gtk3::Window() ;
126125

127126
my $dialog = Gtk3::Dialog->new('Rhombus attributes', $window, 'destroy-with-parent') ;
128127
$dialog->set_default_size($text_width, $text_heigh);
129128
$dialog->set_border_width(0);
130129
$dialog->set_decorated(0);
131-
$dialog->move($root_x+(($X+$text_begin_x)*$character_width)-$h_value, $root_y+(($Y+$text_begin_y)*$character_height)-$v_value);
130+
$dialog->move($root_x+(($X+$text_begin_x)*$character_width), $root_y+(($Y+$text_begin_y)*$character_height));
132131

133132
my $vbox = Gtk3::VBox->new(FALSE, 5);
134133
$vbox->add(Gtk3::Label->new (""));

0 commit comments

Comments
 (0)