settings dialog styling

restyle settings for allowing narrow screen: issue #1328

https://github.com/xournalpp/xournalpp/issues/1328

adapt Settings dialog to smaller screens

fix cbTrySelectOnStrokeFiltered width

make GtkNoteBook scrollable
upstream-master
sanette 5 years ago committed by Roland Lötscher
parent 7db27473e6
commit 35f3ce8595
  1. 27
      src/gui/dialog/SettingsDialog.cpp
  2. 1
      ui/exportSettings.glade
  3. 15
      ui/latexSettings.glade
  4. 3
      ui/pageTemplate.glade
  5. 639
      ui/settings.glade
  6. 9
      ui/xournalpp.css

@ -166,6 +166,33 @@ void SettingsDialog::setDpi(int dpi) {
void SettingsDialog::show(GtkWindow* parent) {
load();
// detect display size. If large enough, we enlarge the Settings
// Window up to 1000x740.
GdkDisplay* disp = gdk_display_get_default();
if (disp != NULL) {
GdkWindow* win = gtk_widget_get_window(GTK_WIDGET(parent));
if (win != NULL) {
GdkMonitor* moni = gdk_display_get_monitor_at_window(disp, win);
GdkRectangle workarea;
gdk_monitor_get_workarea(moni, &workarea);
gint w = -1;
gint h = -1;
if (workarea.width > 1100) {
w = 1000;
} else if (workarea.width > 920) {
w = 900;
}
if (workarea.height > 800) {
h = 740;
} else if (workarea.height > 620) {
h = 600;
}
gtk_window_set_default_size(GTK_WINDOW(this->window), w, h);
} else {
g_message("Parent window does not have a GDK Window. This is unexpected.");
}
}
gtk_window_set_transient_for(GTK_WINDOW(this->window), parent);
int res = gtk_dialog_run(GTK_DIALOG(this->window));

@ -46,6 +46,7 @@
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">4</property>
<property name="margin">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area2">
<property name="name">dialog-action_area2</property>

@ -11,8 +11,8 @@
<object class="GtkScrolledWindow" id="latexSettingsPanel">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<property name="min_content_height">500</property>
<property name="min_content_height">450</property>
<property name="min_content_width">500</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
@ -22,11 +22,13 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="vexpand">True</property>
<child>
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="label_xalign">0.01</property>
<property name="margin">12</property>
<child>
<object class="GtkAlignment">
<property name="visible">True</property>
@ -75,7 +77,8 @@
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="label_xalign">0.01</property>
<property name="margin">12</property>
<child>
<object class="GtkAlignment">
<property name="visible">True</property>
@ -107,6 +110,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="wrap">True</property>
<property name="label" translatable="yes">The following strings will be substituted in the global template file when running the LaTeX tool:</property>
</object>
<packing>
@ -222,7 +226,8 @@
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="label_xalign">0.01</property>
<property name="margin">12</property>
<child>
<object class="GtkAlignment">
<property name="visible">True</property>

@ -28,6 +28,7 @@
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">4</property>
<property name="margin">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area2">
<property name="name">dialog-action_area2</property>
@ -125,7 +126,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="margin_top">10</property>
<property name="margin_top">12</property>
<property name="column_spacing">10</property>
<child>
<object class="GtkLabel" id="label2">

File diff suppressed because it is too large Load Diff

@ -71,3 +71,12 @@ GtkToolbar GtkButton
padding: 2
}
*/
/*
Labels for subsections of the Settings dialog
*/
notebook frame>label{
color: #666;
font-weight: bold;
}

Loading…
Cancel
Save