Commit graph

8 commits

Author SHA1 Message Date
ItsDrike d21e9d1336
Fix SVG scaling in QML
For some reason, the default QML Image element doesn't scale SVGs like
it should. Essentially, it just reads the source size of the SVG and
scales it like it would a regular image (say PNG).

I'm fixing this by manually setting the source size of the image to the
current size. That said, this is in my opinion a hacky fix and it's
really weird that QML doesn't special-case SVGs and scale them as it
should.

Source:
https://stackoverflow.com/questions/69641034/qml-image-does-not-stretch-fit-svg
2024-12-09 20:57:51 +01:00
ItsDrike c5e68601a4
Convert winnability check to property 2024-12-08 17:08:15 +01:00
ItsDrike 57958ed853
Dynamically scale the cards & everything else
Currently, most things were scaled based on the card dimensions,
though some things were hard-coded. This commit moves away from all
hard-coded sizes in favor of everything relying on card heights.

Additionally, it makes the card height itself no longer hard-coded,
passing it as a property to most custom structures.

The card height itself is now calculated from Main.qml to make sure
everything fits within the screen and scales as the window is resized.
2024-12-08 13:09:15 +01:00
ItsDrike 459b23df2b
Add proper design for the draw pile 2024-12-07 23:17:30 +01:00
ItsDrike 190795fdf7
Add flip icon for empty draw pile 2024-12-07 22:16:37 +01:00
ItsDrike 135d16daae
Add winnability check 2024-12-06 05:08:58 +01:00
ItsDrike ad690429a4
Format qml files 2024-12-05 03:24:09 +01:00
ItsDrike cb75fde6d7
Move all qml files to qml/ dir 2024-12-05 01:22:18 +01:00
Renamed from DrawPile.qml (Browse further)