Skip to content
Open
Show file tree
Hide file tree
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
3 changes: 0 additions & 3 deletions app/labeldesigner/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
from .label import SimpleLabel, LabelContent, LabelOrientation, LabelType
from .printer import PrinterQueue

LINE_SPACINGS = (100, 150, 200, 250, 300)

# Don't change as brother_ql is using this DPI value
DEFAULT_DPI = 300

Expand All @@ -39,7 +37,6 @@ def index():
default_image_mode=current_app.config['IMAGE_DEFAULT_MODE'],
default_bw_threshold=current_app.config['IMAGE_DEFAULT_BW_THRESHOLD'],
default_font_family=current_app.config['LABEL_DEFAULT_FONT_FAMILY'],
line_spacings=LINE_SPACINGS,
default_line_spacing=current_app.config['LABEL_DEFAULT_LINE_SPACING'],
default_dpi=DEFAULT_DPI,
default_margin_top=current_app.config['LABEL_DEFAULT_MARGIN_TOP'],
Expand Down
8 changes: 1 addition & 7 deletions app/labeldesigner/templates/labeldesigner.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,7 @@
</div>

<label for="lineSpacing" class="control-label input-group" style="margin-top: 10px; margin-bottom: 0">Line Spacing:</label>
<div class="btn-group btn-group-toggle btn-block" data-toggle="buttons">
{% for line_spacing in line_spacings %}
<label class="btn btn-secondary {% if default_line_spacing == line_spacing %}active{% endif %}" id="lineSpacing{{line_spacing}}">
<input type="radio" name="lineSpacing" onchange="preview()" value="{{line_spacing}}" aria-label="{{line_spacing}}%" {% if default_line_spacing == line_spacing %}checked{% endif %}>{{line_spacing}}%
</label>
{% endfor %}
</div>
<input id="lineSpacing" class="form-control" type="number" min="50" max="300" value="{{ default_line_spacing }}" onChange="preview()" required>

</div>
<!-- class="card-body" -->
Expand Down
2 changes: 1 addition & 1 deletion app/labeldesigner/templates/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function formData(cut_once) {
{% if red_support %}
print_color: $('input[name=printColor]:checked').val(),
{% endif %}
line_spacing: $('input[name=lineSpacing]:checked').val(),
line_spacing: $('#lineSpacing').val(),
cut_once: cut_once ? 1 : 0,
}
}
Expand Down