From 3528bb86ab14c275c41adc7cfa29a5f5eb167ff2 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sat, 17 Jul 2021 09:00:40 +0300 Subject: 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. --- src/ui/certimportwidget.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'src/ui/certimportwidget.c') 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) { init_Widget(w); setId_Widget(w, "certimport"); d->cert = NULL; - /* This should behave similar to sheets. */ { - setPadding1_Widget(w, 3 * gap_UI); - setFrameColor_Widget(w, uiSeparator_ColorId); - setBackgroundColor_Widget(w, uiBackground_ColorId); - setFlags_Widget(w, - mouseModal_WidgetFlag | keepOnTop_WidgetFlag | arrangeVertical_WidgetFlag | - arrangeSize_WidgetFlag | centerHorizontal_WidgetFlag | - parentCannotResize_WidgetFlag | - overflowScrollable_WidgetFlag, - iTrue); - } + /* This should behave similar to sheets. */ + useSheetStyle_Widget(w); addChildFlags_Widget( w, iClob(new_LabelWidget(uiHeading_ColorEscape "${heading.certimport}", NULL)), @@ -168,7 +159,6 @@ void init_CertImportWidget(iCertImportWidget *d) { "certimport.accept" } }, 2); addChild_Widget(w, iClob(buttons)); -// arrange_Widget(w); if (deviceType_App() != desktop_AppDeviceType) { /* Try auto-pasting. */ postCommand_App("certimport.paste"); @@ -263,8 +253,7 @@ static iBool processEvent_CertImportWidget_(iCertImportWidget *d, const SDL_Even } static void draw_CertImportWidget_(const iCertImportWidget *d) { - const iWidget *w = constAs_Widget(d); - draw_Widget(w); + draw_Widget(constAs_Widget(d)); } iBeginDefineSubclass(CertImportWidget, Widget) -- cgit v1.2.3