Remove width setting
parent
3c3421e0bf
commit
ecef7c28be
|
@ -26,7 +26,6 @@ MainWindow::MainWindow(const std::string &timeout)
|
|||
m_spacingAdjustment(Gtk::Adjustment::create(0, -10, 10, 1, 2)),
|
||||
m_marginsAdjustment(Gtk::Adjustment::create(20, 0, 1000, 10, 20)),
|
||||
m_indentAdjustment(Gtk::Adjustment::create(0, 0, 1000, 5, 10)),
|
||||
m_widthAdjustment(Gtk::Adjustment::create(1920, 0, 99999.0, 100, 250)),
|
||||
m_mainDrawCSSProvider(Gtk::CssProvider::create()),
|
||||
m_menu(m_accelGroup),
|
||||
m_draw_main(*this),
|
||||
|
@ -43,7 +42,6 @@ MainWindow::MainWindow(const std::string &timeout)
|
|||
m_spacingLabel("Spacing"),
|
||||
m_marginsLabel("Margins"),
|
||||
m_indentLabel("Indent"),
|
||||
m_widthLabel("Width"),
|
||||
m_appName("LibreWeb Browser"),
|
||||
m_iconTheme("flat"), // filled or flat
|
||||
m_useCurrentGTKIconTheme(false), // Use our built-in icon theme or the GTK icons
|
||||
|
@ -241,19 +239,15 @@ void MainWindow::initSettingsPopover()
|
|||
m_spacingSpinButton.set_adjustment(m_spacingAdjustment);
|
||||
m_marginsSpinButton.set_adjustment(m_marginsAdjustment);
|
||||
m_indentSpinButton.set_adjustment(m_indentAdjustment);
|
||||
m_widthSpinButton.set_adjustment(m_widthAdjustment);
|
||||
m_spacingLabel.set_xalign(1);
|
||||
m_indentLabel.set_xalign(1);
|
||||
m_marginsLabel.set_xalign(1);
|
||||
m_widthLabel.set_xalign(1);
|
||||
auto spacingLabelContext = m_spacingLabel.get_style_context();
|
||||
spacingLabelContext->add_class("dim-label");
|
||||
auto marginsLabelContext = m_marginsLabel.get_style_context();
|
||||
marginsLabelContext->add_class("dim-label");
|
||||
auto indentLabelContext = m_indentLabel.get_style_context();
|
||||
indentLabelContext->add_class("dim-label");
|
||||
auto widthLabelContext = m_widthLabel.get_style_context();
|
||||
widthLabelContext->add_class("dim-label");
|
||||
m_gridSetings.set_margin_start(6);
|
||||
m_gridSetings.set_margin_top(6);
|
||||
m_gridSetings.set_margin_bottom(6);
|
||||
|
@ -265,13 +259,11 @@ void MainWindow::initSettingsPopover()
|
|||
m_gridSetings.attach(m_marginsSpinButton, 1, 1);
|
||||
m_gridSetings.attach(m_indentLabel, 0, 2);
|
||||
m_gridSetings.attach(m_indentSpinButton, 1, 2);
|
||||
m_gridSetings.attach(m_widthLabel, 0, 3);
|
||||
m_gridSetings.attach(m_widthSpinButton, 1, 3);
|
||||
|
||||
m_aboutButton.set_label("About LibreWeb"),
|
||||
|
||||
// Add all to vbox / pop-over
|
||||
m_vboxSettings.set_margin_start(10);
|
||||
// Add all to vbox / pop-over
|
||||
m_vboxSettings.set_margin_start(10);
|
||||
m_vboxSettings.set_margin_end(10);
|
||||
m_vboxSettings.set_margin_top(10);
|
||||
m_vboxSettings.set_margin_bottom(10);
|
||||
|
@ -369,7 +361,6 @@ void MainWindow::initSignals()
|
|||
m_spacingSpinButton.signal_value_changed().connect(sigc::mem_fun(this, &MainWindow::on_spacing_changed));
|
||||
m_marginsSpinButton.signal_value_changed().connect(sigc::mem_fun(this, &MainWindow::on_margins_changed));
|
||||
m_indentSpinButton.signal_value_changed().connect(sigc::mem_fun(this, &MainWindow::on_indent_changed));
|
||||
m_widthSpinButton.signal_value_changed().connect(sigc::mem_fun(this, &MainWindow::on_width_changed));
|
||||
m_aboutButton.signal_clicked().connect(sigc::mem_fun(m_about, &About::show_about));
|
||||
}
|
||||
|
||||
|
@ -1834,11 +1825,6 @@ void MainWindow::on_indent_changed()
|
|||
this->m_draw_main.set_indent(m_indentSpinButton.get_value_as_int());
|
||||
}
|
||||
|
||||
void MainWindow::on_width_changed()
|
||||
{
|
||||
std::cout << "Value: " << m_widthSpinButton.get_value_as_int() << std::endl;
|
||||
}
|
||||
|
||||
void MainWindow::update_main_css_provider()
|
||||
{
|
||||
m_mainDrawCSSProvider->load_from_data("textview { "
|
||||
|
|
|
@ -86,7 +86,6 @@ protected:
|
|||
void on_spacing_changed();
|
||||
void on_margins_changed();
|
||||
void on_indent_changed();
|
||||
void on_width_changed();
|
||||
void update_main_css_provider();
|
||||
|
||||
Glib::RefPtr<Gtk::AccelGroup> m_accelGroup; /*!< Accelerator group, used for keyboard shortcut bindings */
|
||||
|
@ -95,7 +94,6 @@ protected:
|
|||
Glib::RefPtr<Gtk::Adjustment> m_spacingAdjustment; /*!< Spacing adjustment settings */
|
||||
Glib::RefPtr<Gtk::Adjustment> m_marginsAdjustment; /*!< Margins adjustment settings */
|
||||
Glib::RefPtr<Gtk::Adjustment> m_indentAdjustment; /*!< Indent adjustment settings */
|
||||
Glib::RefPtr<Gtk::Adjustment> m_widthAdjustment; /*!< Width adjustment settings */
|
||||
|
||||
Glib::RefPtr<Gtk::CssProvider> m_mainDrawCSSProvider; /*!< CSS Provider for main draw textview */
|
||||
|
||||
|
@ -129,7 +127,6 @@ protected:
|
|||
Gtk::SpinButton m_spacingSpinButton;
|
||||
Gtk::SpinButton m_indentSpinButton;
|
||||
Gtk::SpinButton m_marginsSpinButton;
|
||||
Gtk::SpinButton m_widthSpinButton;
|
||||
Gtk::ModelButton m_aboutButton;
|
||||
Gtk::Button m_backButton;
|
||||
Gtk::Button m_forwardButton;
|
||||
|
@ -201,7 +198,6 @@ protected:
|
|||
Gtk::Label m_spacingLabel;
|
||||
Gtk::Label m_marginsLabel;
|
||||
Gtk::Label m_indentLabel;
|
||||
Gtk::Label m_widthLabel;
|
||||
Gtk::Label m_statusLabel;
|
||||
std::unique_ptr<Gtk::MessageDialog> m_contentPublishedDialog;
|
||||
Gtk::ScrolledWindow m_scrolledWindowMain;
|
||||
|
|
Loading…
Reference in New Issue