Skip to content

Commit

Permalink
ui: Improve dialog backgrounds.
Browse files Browse the repository at this point in the history
Primarily, they now actually meet their contents, by being on the front
faces of their blocks; previously there was 15/16ths of a block of gap.

I also redrew the theme image. The new design has much less empty space
between the border and the content, is more rectangular, and has a faint
checkerboard pattern in the background. This checkerboard is not
necessarily the direction I want the art style to go, but as a temporary
measure, it will help when we’re debugging UI layout and want to count
how many cubes a widget is occupying, and it also adds some distraction
from widgets’ blocks’ shadows against the background.

In the future, I hope the dialog background will be able to be not just
2D, and will incorporate more shades of color. (Perhaps we will have a
complementary theme color that isn’t also the logo color.)
  • Loading branch information
kpreid committed Jul 29, 2024
1 parent b24b746 commit 24c21d3
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions all-is-cubes-ui/src/vui/widgets/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,10 @@ impl WidgetBlocks {
R64, // 16 res × 4 tiles
txn.insert_anonymous(space_from_image(
include_image!("theme/dialog-background.png"),
GridRotation::IDENTITY,
&default_srgb,
GridRotation::RXYZ,
// place image on the front face (of the R16 individual blocks!)
// so it meets the back of the widgets in the dialog.
&|color| default_srgb(color).translate([0, 0, 15]),
)?),
)
.build()
Expand Down
Binary file modified all-is-cubes-ui/src/vui/widgets/theme/dialog-background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test-renderers/expected/ui/session_modal-all.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test-renderers/expected/ui/session_page_pause-all.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test-renderers/expected/ui/session_page_progress-all.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 24c21d3

Please sign in to comment.