-
Notifications
You must be signed in to change notification settings - Fork 129
Conversation
…OverscanValue implementations
Syntax for reversing the overscan using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comment about the -+ syntax.
Secondly Please move the crop settings above the resolution. They are processed in order, it would be good to set them in order too.
Lastly, can we make 0
value do nothing instead of being invalid? Same as with resolution if the setting is 0 or empty it should be considered the same - disabled
string_value = re.sub(r"([ ]+)?px", " ", string_value) | ||
string_value = re.sub(r"([ ]+)%", "%", string_value) | ||
# Make sure +/- sign at the beggining of string is next to number | ||
string_value = re.sub(r"^([\+\-])[ ]+", "\g<1>", string_value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid escape sequence '\g'
Swapped +/- in code. Fixed.
Done
Done. Additional question, what if output is smaller than 0px? (Small chance but possible...) |
Description
-10%+
(10
is random number) which says that input resoltuion is 110% of expected output (input width 2200px -> output width 2000px)+300px
will add 150px on both sides and keep center in centerExample variants with description
50%
300px
300
px
).0px
+0px
+300px
-300px
+10%
-10%
-10%+
Closes https://github.com/pypeclub/client/issues/53#issuecomment-846796817