From 20537ed3da9682a4fdadf20e8859bb8d0c64dfeb Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 19 May 2023 13:33:53 +0200 Subject: [PATCH] Revert "PixelPaint: Add support for box sampling scaling" This reverts commit d6aefb1bf121b21745410c666dd612ca6fa5f016. --- Userland/Applications/PixelPaint/ResizeImageDialog.cpp | 9 ++------- Userland/Applications/PixelPaint/ResizeImageDialog.gml | 8 +------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/Userland/Applications/PixelPaint/ResizeImageDialog.cpp b/Userland/Applications/PixelPaint/ResizeImageDialog.cpp index dc6b9d9504..edc2e26d01 100644 --- a/Userland/Applications/PixelPaint/ResizeImageDialog.cpp +++ b/Userland/Applications/PixelPaint/ResizeImageDialog.cpp @@ -69,18 +69,17 @@ ResizeImageDialog::ResizeImageDialog(Gfx::IntSize suggested_size, GUI::Window* p auto nearest_neighbor_radio = main_widget->find_descendant_of_type_named("nearest_neighbor_radio"); auto smooth_pixels_radio = main_widget->find_descendant_of_type_named("smooth_pixels_radio"); auto bilinear_radio = main_widget->find_descendant_of_type_named("bilinear_radio"); - auto box_sampling_radio = main_widget->find_descendant_of_type_named("box_sampling_radio"); auto resize_canvas_radio = main_widget->find_descendant_of_type_named("resize_canvas"); VERIFY(nearest_neighbor_radio); VERIFY(smooth_pixels_radio); VERIFY(bilinear_radio); - VERIFY(box_sampling_radio); VERIFY(resize_canvas_radio); m_scaling_mode = Gfx::Painter::ScalingMode::NearestNeighbor; - if (bilinear_radio->is_checked()) + if (bilinear_radio->is_checked()) { m_scaling_mode = Gfx::Painter::ScalingMode::BilinearBlend; + } nearest_neighbor_radio->on_checked = [this](bool is_checked) { if (is_checked) @@ -94,10 +93,6 @@ ResizeImageDialog::ResizeImageDialog(Gfx::IntSize suggested_size, GUI::Window* p if (is_checked) m_scaling_mode = Gfx::Painter::ScalingMode::BilinearBlend; }; - box_sampling_radio->on_checked = [this](bool is_checked) { - if (is_checked) - m_scaling_mode = Gfx::Painter::ScalingMode::BoxSampling; - }; resize_canvas_radio->on_checked = [this](bool is_checked) { if (is_checked) m_scaling_mode = Gfx::Painter::ScalingMode::None; diff --git a/Userland/Applications/PixelPaint/ResizeImageDialog.gml b/Userland/Applications/PixelPaint/ResizeImageDialog.gml index 39bcca0a57..fa743b49ec 100644 --- a/Userland/Applications/PixelPaint/ResizeImageDialog.gml +++ b/Userland/Applications/PixelPaint/ResizeImageDialog.gml @@ -1,7 +1,7 @@ @GUI::Widget { fill_with_background_color: true min_width: 260 - min_height: 280 + min_height: 260 layout: @GUI::VerticalBoxLayout { margins: [4] } @@ -93,12 +93,6 @@ autosize: true } - @GUI::RadioButton { - name: "box_sampling_radio" - text: "Box Sampling" - autosize: true - } - @GUI::RadioButton { name: "resize_canvas" text: "Resize Canvas (None)"