summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-09-21 08:19:02 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-09-21 08:19:02 +0300
commit9721a5f46bd2e3b1cc564cf615ef716658ef9c1a (patch)
treead5a5197991ef7e7d4a6a44c954f8f946a5e9463 /src/ui
parentfb01da68c401287376699409858d2b0ec507e52b (diff)
Added Prefs; placeholders for new options
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/documentwidget.c7
-rw-r--r--src/ui/util.c16
2 files changed, 20 insertions, 3 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index 735a7214..69dde8c7 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -243,10 +243,11 @@ static void resetSmoothScroll_DocumentWidget_(iDocumentWidget *d) {
243} 243}
244 244
245static int documentWidth_DocumentWidget_(const iDocumentWidget *d) { 245static int documentWidth_DocumentWidget_(const iDocumentWidget *d) {
246 const iWidget *w = constAs_Widget(d); 246 const iWidget *w = constAs_Widget(d);
247 const iRect bounds = bounds_Widget(w); 247 const iRect bounds = bounds_Widget(w);
248 const iPrefs * prefs = prefs_App();
248 return iMini(bounds.size.x - gap_UI * d->pageMargin * 2, 249 return iMini(bounds.size.x - gap_UI * d->pageMargin * 2,
249 fontSize_UI * 40 * zoom_App() / 100); /* TODO: Add user preference .*/ 250 fontSize_UI * prefs->lineWidth * prefs->zoomPercent / 100);
250} 251}
251 252
252static iRect documentBounds_DocumentWidget_(const iDocumentWidget *d) { 253static iRect documentBounds_DocumentWidget_(const iDocumentWidget *d) {
diff --git a/src/ui/util.c b/src/ui/util.c
index bdc1c813..52107d81 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -878,6 +878,22 @@ iWidget *makePreferences_Widget(void) {
878 addChild_Widget(headings, iClob(makeHeading_Widget("UI scale factor:"))); 878 addChild_Widget(headings, iClob(makeHeading_Widget("UI scale factor:")));
879 setId_Widget(addChild_Widget(values, iClob(new_InputWidget(8))), "prefs.uiscale"); 879 setId_Widget(addChild_Widget(values, iClob(new_InputWidget(8))), "prefs.uiscale");
880 } 880 }
881 /* Layout. */ {
882 appendTwoColumnPage_(tabs, "Layout", &headings, &values);
883 addChild_Widget(headings, iClob(makeHeading_Widget("Line width:")));
884 addChild_Widget(values, iClob(new_LabelWidget("Normal", 0, 0, NULL)));
885 addChild_Widget(headings, iClob(makeHeading_Widget("First paragaph:")));
886 addChild_Widget(values, iClob(new_LabelWidget("Emphasized", 0, 0, NULL)));
887 }
888 /* Colors. */ {
889 appendTwoColumnPage_(tabs, "Colors", &headings, &values);
890 addChild_Widget(headings, iClob(makeHeading_Widget("Saturation:")));
891 addChild_Widget(values, iClob(new_LabelWidget("Full", 0, 0, 0)));
892 addChild_Widget(headings, iClob(makeHeading_Widget("Dark theme:")));
893 addChild_Widget(values, iClob(new_LabelWidget("Colorful", 0, 0, 0)));
894 addChild_Widget(headings, iClob(makeHeading_Widget("Light theme:")));
895 addChild_Widget(values, iClob(new_LabelWidget("White", 0, 0, 0)));
896 }
881 /* Proxies. */ { 897 /* Proxies. */ {
882 appendTwoColumnPage_(tabs, "Proxies", &headings, &values); 898 appendTwoColumnPage_(tabs, "Proxies", &headings, &values);
883 addChild_Widget(headings, iClob(makeHeading_Widget("Gopher proxy:"))); 899 addChild_Widget(headings, iClob(makeHeading_Widget("Gopher proxy:")));