mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
Revert "Attempt to align slider and buttons in a widget"
This reverts commit ad44f4f448
.
This commit is contained in:
parent
ad44f4f448
commit
dee329a21f
@ -629,9 +629,6 @@ GuiView::GuiView(int id)
|
||||
|
||||
QFontMetrics const fm(statusBar()->fontMetrics());
|
||||
|
||||
zoomwidget_ = new QWidget(statusBar());
|
||||
zoomwidget_->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
QHBoxLayout * zoomlayout = new QHBoxLayout(zoomwidget_);
|
||||
zoom_slider_ = new QSlider(Qt::Horizontal, statusBar());
|
||||
// Small size slider for macOS to prevent the status bar from enlarging
|
||||
zoom_slider_->setAttribute(Qt::WA_MacSmallSize);
|
||||
@ -664,11 +661,12 @@ GuiView::GuiView(int id)
|
||||
zoom_out_->setFixedSize(QSize(fm.height(), fm.height()));
|
||||
zoom_out_->setFlat(true);
|
||||
|
||||
zoomlayout->addWidget(zoom_out_);
|
||||
zoomlayout->addWidget(zoom_slider_);
|
||||
zoomlayout->addWidget(zoom_in_);
|
||||
zoomwidget_->setEnabled(currentBufferView());
|
||||
statusBar()->addPermanentWidget(zoomwidget_);
|
||||
statusBar()->addPermanentWidget(zoom_out_);
|
||||
zoom_out_->setEnabled(currentBufferView());
|
||||
statusBar()->addPermanentWidget(zoom_slider_);
|
||||
zoom_slider_->setEnabled(currentBufferView());
|
||||
zoom_in_->setEnabled(currentBufferView());
|
||||
statusBar()->addPermanentWidget(zoom_in_);
|
||||
|
||||
connect(zoom_slider_, SIGNAL(sliderMoved(int)), this, SLOT(zoomSliderMoved(int)));
|
||||
connect(zoom_slider_, SIGNAL(valueChanged(int)), this, SLOT(zoomValueChanged(int)));
|
||||
@ -1402,8 +1400,10 @@ void GuiView::onBufferViewChanged()
|
||||
// Buffer-dependent dialogs must be updated. This is done here because
|
||||
// some dialogs require buffer()->text.
|
||||
updateDialogs();
|
||||
zoomwidget_->setEnabled(currentBufferView());
|
||||
zoom_slider_->setEnabled(currentBufferView());
|
||||
zoom_value_->setEnabled(currentBufferView());
|
||||
zoom_in_->setEnabled(currentBufferView());
|
||||
zoom_out_->setEnabled(currentBufferView());
|
||||
}
|
||||
|
||||
|
||||
|
@ -29,7 +29,6 @@ class QPushButton;
|
||||
class QLabel;
|
||||
class QShowEvent;
|
||||
class QSlider;
|
||||
class QWidget;
|
||||
|
||||
|
||||
namespace lyx {
|
||||
@ -508,8 +507,6 @@ private:
|
||||
QPushButton * zoom_in_;
|
||||
/// Zoom out ("-") Button
|
||||
QPushButton * zoom_out_;
|
||||
/// The frame all slider elements are embedded in
|
||||
QWidget * zoomwidget_;
|
||||
|
||||
/// The rate from which the actual zoom value is calculated
|
||||
/// from the default zoom pref
|
||||
|
Loading…
Reference in New Issue
Block a user