How to round specific corners of a View?

Demo (Source code is available at the end of the post) iOS 16+ built-in modifier (Xcode 15 needed) Clip the view using the new UnevenRoundedRectangle: .clipShape( .rect( topLeadingRadius: 0, bottomLeadingRadius: 20, bottomTrailingRadius: 0, topTrailingRadius: 20 ) ) ⚠️ Note: Although it works from iOS 16, .rect needs Xcode 15 to be available. iOS 13+ You … Read more

Should an icon show current state or next state?

There is neither standardization nor general human tendency on this. For example, MS Windows UX Interaction Guidelines specifies four basic kinds of toggling progressive disclosure control. Three out of four show the state-when-activated, while one shows the current state. I believe if you test a particular approach on your users, you’ll get different results depending … Read more

State Machines and User Interface work — any examples/experience?

I’m currently working with a (proprietary) framework that lends itself well to the UI-as-state-machine paradigm, and it can definitely reduce (but not eliminate) the problems with complex and unforeseen interactions between UI elements. The main benefit is that it allows you to think at a higher level of abstraction, at a higher granularity. Instead of … Read more

GUI tools that are actively developed and well documented for Haskell

wxHaskell is good, yes, and my go-to GUI middle level library. I admit there’s been a focus on updating the code before the docs in the new version. For modern, functional-reactive-programming fun stuff on top of it I gor for reactive banana, which is actively maintained, and has the added benefit that Heinrich Apfelmus himself … Read more

Why is a modal/modeless dialog called modal/modeless?

With a modal dialog, you set your application in a particular mode (a different “state” if you will), whereby only actions pertaining to that “mode” are accepted, hence preventing UI actions outside of the dialog. At Andreas’ prompting I thought I may have to dig dusty Windows API books, as often, the etymology/origin of a … Read more

What is an example of a task based UI?

The easiest way to generate a task based UI is to protect all attributes/properties of your models. i.e. remove all setters. From this (pseudo code): public class TodoTask { public Date getDateAssigned(); public void setDateAssigned(Date); public string getAssignedTo(); public void setAssignedTo(string); } to this: public class TodoTask { public Date getDateAssigned(); public string getAssignedTo(); public … Read more

What is the best automated website UI testing framework [closed]

I definitively recommend Selenium, you can use it from .NET, supports different browsers, works in automatic builds and CI processes (we use it from CCNet). The code is stable. It has a few quirks, but after all they all do. Whichever tool you choose, I recommend making your own test facade class(es) around it. The … Read more

Ideal size for .ico

Short answer: 16 x 16 pixels. Long answer: .ico files can actually contain multiple images, at multiple colour depths – you can provide 16×16, 32×32, 48×48 and 64×64 in a single file and the OS will pick the best one to show. Of course to keep the file size low you don’t want to put … Read more

How to scroll to a specific element in ScrollRect with Unity UI?

I am going to give you a code snippet of mine because I feel like being helpful. Hope this helps! protected ScrollRect scrollRect; protected RectTransform contentPanel; public void SnapTo(RectTransform target) { Canvas.ForceUpdateCanvases(); contentPanel.anchoredPosition = (Vector2)scrollRect.transform.InverseTransformPoint(contentPanel.position) – (Vector2)scrollRect.transform.InverseTransformPoint(target.position); }