Skip to content

Make Shutter read the xpm cursors x_hot and y_hot coordinates#813

Merged
Photon89 merged 3 commits into
masterfrom
fix-xpm-loading
May 9, 2026
Merged

Make Shutter read the xpm cursors x_hot and y_hot coordinates#813
Photon89 merged 3 commits into
masterfrom
fix-xpm-loading

Conversation

@Photon89
Copy link
Copy Markdown
Member

@Photon89 Photon89 commented May 9, 2026

Since upstream is irresponsive (see https://gitlab.gnome.org/GNOME/glycin/-/work_items/291), Shutter can now read the coordinates directly from the xpm files. This will fix #808.

@Photon89 Photon89 requested a review from DarthGandalf May 9, 2026 05:53
Comment thread share/shutter/resources/modules/Shutter/Draw/DrawingTool.pm Outdated
Comment thread share/shutter/resources/modules/Shutter/Draw/DrawingTool.pm Outdated
Comment thread share/shutter/resources/modules/Shutter/Draw/DrawingTool.pm
Comment thread share/shutter/resources/modules/Shutter/Draw/DrawingTool.pm Outdated
Comment thread share/shutter/resources/modules/Shutter/Draw/DrawingTool.pm Outdated
Comment thread share/shutter/resources/modules/Shutter/Draw/DrawingTool.pm Outdated
#of these values
$self->{_cursors}{$cname}{'x_hot'} = $self->{_cursors}{$cname}->get_option('x_hot');
$self->{_cursors}{$cname}{'y_hot'} = $self->{_cursors}{$cname}->get_option('y_hot');
if (!$pixbuf) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here is mix of tabs and spaces

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

$self->{_cursors}{$self->{_current_mode_descr}}{'x_hot'}, $self->{_cursors}{$self->{_current_mode_descr}}{'y_hot'},
);
}
if (exists $self->{_cursors}{$self->{_current_mode_descr}}) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mix of tabs and spaces

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

@DarthGandalf
Copy link
Copy Markdown
Member

Other than whitespaces, looks good

$self->{_cursors}{$self->{_current_mode_descr}}{'x_hot'}, $self->{_cursors}{$self->{_current_mode_descr}}{'y_hot'},
);
}
my $cursor_data = $self->{_cursors}{$self->{_current_mode_descr}};
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still bad indent

@Photon89
Copy link
Copy Markdown
Member Author

Photon89 commented May 9, 2026

Should be okay now! I guess, I need to look for a better text editor...

@Photon89 Photon89 merged commit 7796539 into master May 9, 2026
1 check passed
@DarthGandalf
Copy link
Copy Markdown
Member

Should be okay now!

Nope

I need to look for a better text editor.

in nvim I have this: vim.opt.listchars = { tab = '▸ ' } which makes tab and spaces more visible

@Photon89
Copy link
Copy Markdown
Member Author

Photon89 commented May 9, 2026

Sorry, I merged too fast. What is the best way to fix the last whitespace problem? A new PR?

@DarthGandalf
Copy link
Copy Markdown
Member

That works. Dunno if it's the best one

@Photon89
Copy link
Copy Markdown
Member Author

Photon89 commented May 9, 2026

Done in #814. Would you also like to review #792, #798, #806 or shall we merge them?

@Photon89 Photon89 deleted the fix-xpm-loading branch May 9, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Internal image editor does not open

2 participants