fix: rotate preview to be human-readable #4

Merged
q3k merged 2 commits from ptrc/labelmaker:rotate-preview into master 2024-05-08 20:38:09 +00:00
There is no content yet.
ptrc added 1 commit 2024-05-08 20:30:38 +00:00
ptrc changed title from fix: rotate preview to be human-readable to WIP: fix: rotate preview to be human-readable 2024-05-08 20:30:42 +00:00
ptrc changed title from WIP: fix: rotate preview to be human-readable to fix: rotate preview to be human-readable 2024-05-08 20:30:49 +00:00
ptrc requested review from etorameth 2024-05-08 20:30:57 +00:00
ptrc requested review from radex 2024-05-08 20:31:05 +00:00
ptrc added 1 commit 2024-05-08 20:32:56 +00:00
3d088365be fix: move preview above settings
otherwise it's a preview for ants

end result on firefox:

image

end result on firefox: ![image](/attachments/d8561e12-a7f9-4962-862b-d1195c8acd73)
q3k requested changes 2024-05-08 20:34:01 +00:00
@ -17,3 +17,3 @@
INCH_PER_MM = 0.039
DPI = 300
def __init__(self, size=(36, 89)):
def __init__(self, preview=False, size=(36, 89)):

New argument is unused.

New argument is unused.

whoops, left over after trying to incorporate this into Renderer itself, thanks

whoops, left over after trying to incorporate this into Renderer itself, thanks

removed

removed
ptrc marked this conversation as resolved
@ -38,6 +38,16 @@ class Renderer(object):
with open(name, 'wb') as f:
self.surface.write_to_png(f)
def get_preview(self):

Note: you could also just rotate this in CSS, but this is fine too if you insist.

Note: you could also just rotate this in CSS, but this is fine too if you insist.

transform: rotate(-90deg) messes up the layout on FF

`transform: rotate(-90deg)` messes up the layout on FF

as in, this happens, because the transform is applied after max-width determines the size, and resizing it on the backend seems like a less painful solution than working around this bullshit client-side

image

as in, *this* happens, because the transform is applied after `max-width` determines the size, and resizing it on the backend seems like a less painful solution than working around this bullshit client-side ![image](/attachments/45af17cd-6f50-447f-9a77-aa07d1449bbc)

Ack.

Ack.
q3k marked this conversation as resolved
ptrc force-pushed rotate-preview from 3d088365be to 67efaca6dc 2024-05-08 20:37:30 +00:00 Compare
q3k merged commit 67efaca6dc into master 2024-05-08 20:38:09 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: hswaw/labelmaker#4
There is no content yet.