summaryrefslogtreecommitdiff
path: root/src/ui/certimportwidget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-07-17 09:00:40 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-07-17 09:00:40 +0300
commit3528bb86ab14c275c41adc7cfa29a5f5eb167ff2 (patch)
tree4b93b0f2bb9718408d4b855d1f8b8ed17a3e690f /src/ui/certimportwidget.c
parent7e536572b602cba180ad4e85bd9c071479f6fa22 (diff)
Working on a UI for uploading text/data
`UploadWidget` allows entering long-form text or dropping a file for uploading. InputWidget isn't yet well suited for really long documents... Some optimizations will be needed.
Diffstat (limited to 'src/ui/certimportwidget.c')
-rw-r--r--src/ui/certimportwidget.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/ui/certimportwidget.c b/src/ui/certimportwidget.c
index 6e818137..a8346e19 100644
--- a/src/ui/certimportwidget.c
+++ b/src/ui/certimportwidget.c
@@ -107,17 +107,8 @@ void init_CertImportWidget(iCertImportWidget *d) {
107 init_Widget(w); 107 init_Widget(w);
108 setId_Widget(w, "certimport"); 108 setId_Widget(w, "certimport");
109 d->cert = NULL; 109 d->cert = NULL;
110 /* This should behave similar to sheets. */ { 110 /* This should behave similar to sheets. */
111 setPadding1_Widget(w, 3 * gap_UI); 111 useSheetStyle_Widget(w);
112 setFrameColor_Widget(w, uiSeparator_ColorId);
113 setBackgroundColor_Widget(w, uiBackground_ColorId);
114 setFlags_Widget(w,
115 mouseModal_WidgetFlag | keepOnTop_WidgetFlag | arrangeVertical_WidgetFlag |
116 arrangeSize_WidgetFlag | centerHorizontal_WidgetFlag |
117 parentCannotResize_WidgetFlag |
118 overflowScrollable_WidgetFlag,
119 iTrue);
120 }
121 addChildFlags_Widget( 112 addChildFlags_Widget(
122 w, 113 w,
123 iClob(new_LabelWidget(uiHeading_ColorEscape "${heading.certimport}", NULL)), 114 iClob(new_LabelWidget(uiHeading_ColorEscape "${heading.certimport}", NULL)),
@@ -168,7 +159,6 @@ void init_CertImportWidget(iCertImportWidget *d) {
168 "certimport.accept" } }, 159 "certimport.accept" } },
169 2); 160 2);
170 addChild_Widget(w, iClob(buttons)); 161 addChild_Widget(w, iClob(buttons));
171// arrange_Widget(w);
172 if (deviceType_App() != desktop_AppDeviceType) { 162 if (deviceType_App() != desktop_AppDeviceType) {
173 /* Try auto-pasting. */ 163 /* Try auto-pasting. */
174 postCommand_App("certimport.paste"); 164 postCommand_App("certimport.paste");
@@ -263,8 +253,7 @@ static iBool processEvent_CertImportWidget_(iCertImportWidget *d, const SDL_Even
263} 253}
264 254
265static void draw_CertImportWidget_(const iCertImportWidget *d) { 255static void draw_CertImportWidget_(const iCertImportWidget *d) {
266 const iWidget *w = constAs_Widget(d); 256 draw_Widget(constAs_Widget(d));
267 draw_Widget(w);
268} 257}
269 258
270iBeginDefineSubclass(CertImportWidget, Widget) 259iBeginDefineSubclass(CertImportWidget, Widget)