QrCodeGenDialog: hide margin widgets with zxing >= 3.0
After
commit 2baf1bceff
Author: Xisco Fauli <xiscofauli@libreoffice.org>
Date: Fri Feb 27 12:23:31 2026 +0100
zxing: use new CreateBarcode API with zxing >= 3.0
Change-Id: Ic1207b24c4df40ebc2ef3def677615f85e8b3ed9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200883
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
@@ -210,12 +210,19 @@ QrCodeGenDialog::QrCodeGenDialog(weld::Widget* pParent, Reference<XModel> xModel
|
||||
m_xBuilder->weld_radio_button(u"button_medium"_ustr),
|
||||
m_xBuilder->weld_radio_button(u"button_quartile"_ustr),
|
||||
m_xBuilder->weld_radio_button(u"button_high"_ustr) }
|
||||
, m_xLabelMargin(m_xBuilder->weld_label(u"label_margin"_ustr))
|
||||
, m_xSpinBorder(m_xBuilder->weld_spin_button(u"edit_margin"_ustr))
|
||||
, m_xComboType(m_xBuilder->weld_combo_box(u"choose_type"_ustr))
|
||||
#if ENABLE_ZXING
|
||||
, mpParent(pParent)
|
||||
#endif
|
||||
{
|
||||
#if ZXING_VERSION_MAJOR >= 3
|
||||
// The new API simply does not allow to specify an arbitrary number of margin pixels.
|
||||
m_xLabelMargin->hide();
|
||||
m_xSpinBorder->hide();
|
||||
#endif
|
||||
|
||||
m_xEdittext->set_size_request(m_xEdittext->get_approximate_digit_width() * 28,
|
||||
m_xEdittext->get_height_rows(6));
|
||||
if (!bEditExisting)
|
||||
|
||||
@@ -40,6 +40,7 @@ private:
|
||||
css::uno::Reference<css::frame::XModel> m_xModel;
|
||||
std::unique_ptr<weld::TextView> m_xEdittext;
|
||||
std::unique_ptr<weld::RadioButton> m_xECC[4];
|
||||
std::unique_ptr<weld::Label> m_xLabelMargin;
|
||||
std::unique_ptr<weld::SpinButton> m_xSpinBorder;
|
||||
std::unique_ptr<weld::ComboBox> m_xComboType;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user