Skip to content

Commit

Permalink
Disabling image rotation.
Browse files Browse the repository at this point in the history
  • Loading branch information
phase1geo committed Jan 8, 2024
1 parent 200a33a commit f25ad85
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/CanvasImage.vala
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ using Cairo;

public class CanvasImage {

private const int selector_size = 10;
private const int selector_size = 10;
private const int crop_selectors = 8; // TODO - Set to 9 to enable rotation

private double selector_width {
get {
return( selector_size / width_scale );
Expand Down Expand Up @@ -221,7 +223,7 @@ public class CanvasImage {
_crop_index = -2;

if( cropping ) {
for( int i=0; i<9; i++ ) {
for( int i=0; i<crop_selectors; i++ ) {
selector_bbox( i, rect );
if( rect.contains( x, y ) ) {
_crop_index = i;
Expand Down Expand Up @@ -309,7 +311,7 @@ public class CanvasImage {
/* If we are hovering over a crop selector, change the cursor */
} else {
var rect = new CanvasRect();
for( int i=0; i<9; i++ ) {
for( int i=0; i<crop_selectors; i++ ) {
selector_bbox( i, rect );
if( rect.contains( x, y ) ) {
_canvas.set_cursor( _sel_cursors[i] );
Expand Down Expand Up @@ -538,7 +540,7 @@ public class CanvasImage {
draw_crop_outline( ctx );
draw_crop_dividers( ctx );
draw_crop_selectors( ctx );
draw_rotate_selector( ctx );
// TODO - draw_rotate_selector( ctx );
}

/* Draws the image */
Expand Down
3 changes: 2 additions & 1 deletion src/CanvasToolbar.vala
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,8 @@ public class CanvasToolbar : Box {

_crop_btn = new ToggleButton() {
has_frame = false,
tooltip_text = _( "Crop/Rotate Image" ),
// TODO - tooltip_text = _( "Crop/Rotate Image" ),
tooltip_text = _( "Crop Image" ),
icon_name = "image-crop-symbolic",
margin_start = margin,
margin_end = margin
Expand Down

0 comments on commit f25ad85

Please sign in to comment.