Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/util/background-gl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ void BackgroundImage::generate_adjustments(int width, int height)
adjustments->scale_y = 1.0;
} else if (!fill_and_crop_string.compare(fill_type))
{
auto width_difference = screen_width - source_width;
auto height_difference = screen_height - source_height;
double width_difference = screen_width - source_width;
double height_difference = screen_height - source_height;
if (width_difference > height_difference)
{
adjustments->scale_x = 1.0;
Expand All @@ -182,8 +182,8 @@ void BackgroundImage::generate_adjustments(int width, int height)
}
} else /* "preserve_aspect" */
{
auto width_difference = screen_width / source_width;
auto height_difference = screen_height / source_height;
double width_difference = screen_width / source_width;
double height_difference = screen_height / source_height;
if (width_difference > height_difference)
{
adjustments->scale_x = (screen_width / screen_height) * (source_height / source_width);
Expand Down