Code Monkey home page Code Monkey logo

cosmic-settings's Introduction

COSMIC Settings

The settings application for the COSMIC desktop environment.

Translators

Translation files may be found in the i18n directory. New translations may copy the English (en) localization of the project and rename en to the desired ISO 639-1 language code. Translations may be submitted through GitHub as an issue or pull request. Submissions by email or other means are also acceptable; with the preferred name and email to associate with the changes.

Build

Dependencies

  • rust (>= 1.71.0)
  • just
  • cmake
  • libexpat1-dev
  • libfontconfig-dev
  • libfreetype-dev
  • pkg-config

Install

COSMIC uses just as its preferred build tool.

just
sudo just install

Packaging

If packaging for a Linux distribution, vendor dependencies locally with the vendor rule, and build with the vendored sources using the build-vendored rule. When installing files, use the rootdir and prefix variables to change installation paths.

just vendor
just build-vendored
just rootdir=debian/cosmic-settings prefix=/usr install

It is recommended to build a source tarball with the vendored dependencies, which can typically be done by running just vendor on the host system before it enters the build environment. Reference debian/rules to see how we generate debian packages with sbuild.

Developers

Developers should install rustup and configure their editor to use rust-analyzer. Run just check to ensure that the changes you make are free of linter warnings. You may configure your editor to run just check-json as the rust-analyzer check command.

To improve compilation times, disable LTO in the release profile, install the mold linker, and configure sccache for use with Rust. The mold linker will only improve link times if LTO is disabled.

Run the cosmic-settings binary with just run so that logs will be emitted to stderr, and crashes will generate detailed backtraces. Applications shouldn't crash, so when writing code, avoid use of unwrap() and expect(). Instead, log errors with tracing::error!() or tracing::warn!().

License

Licensed under the GNU Public License 3.0.

Contribution

Any contribution intentionally submitted for inclusion in the work by you shall be licensed under the GNU Public License 3.0 (GPL-3.0). Each source file should have a SPDX copyright notice at the top of the file:

// SPDX-License-Identifier: GPL-3.0-only

cosmic-settings's People

Contributors

178900pritam avatar arkenys avatar bittin avatar burakturkerdev avatar edfloreshz avatar falexei avatar git-f0x avatar gustavosaquino avatar hugok79 avatar ids1024 avatar jackpot51 avatar jasonrhansen avatar jokeyrhyme avatar joshuamegnauth54 avatar krahos avatar maciekk64 avatar mmstick avatar moi-cest-matthew avatar n-hoffmann avatar nyabinary avatar rmsthebest avatar ryanabx avatar skygrango avatar smoka7 avatar soloturn avatar vandalhj avatar wash2 avatar wiiznokes avatar yorimirus avatar ysfchn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cosmic-settings's Issues

Can't disable laptop display

Note that this bug occurs with wdisplays too, so nothing to do with cosmic settings specifically. Also a bug with Pop on Wayland, so I'm pretty sure this is just a general wayland bug.

(Settings/Desktop/Appearance) Colour Picker Does Not Fully Update.

When using a colour picker spawned by the Appearance settings, switching between theme sections will update the values in the colour picker, save for the 2 dimensional brightness/saturation array.

Here you can see the issue:

Screenshot_2023-11-10_15-49-10
Screenshot_2023-11-10_15-49-19

In the first image, the "Application or window background" value has been selected to edit.

In the second image, without closing the colour picker, "Interface text tint" was selected.

The window has updated between the two - the Hex value displayed is correct, and the Hue slider is correctly updated. However the brightness/saturation array still shows the previous "Application or window background" values.

Settings > Sound

This design needs to be paired back for the first COSMIC release.

  1. Do not include speaker testing (the "Test" button and interfaces)
  2. Do not include per-application volume levels

These can arrive in COSMIC V2.

-- Carl

(Settings/Desktop/Appearance) Custom Accent colour looses UX element

We have an array of pre-set colours for the Accent in the Settings/Desktop/Appearance menu. The last option in the array is to select a custom colour, which is indicated by a white "plus" and border.

I believe some form of UX element is supposed to be maintained even after a custom colour is set, but it isn't. This could make it un-intuitive for a user who later goes to change their theming, or one who had theming set by someone else, either by importing a theme or receiving a system set up by family or friends.

In the top half of this image I've selected a custom accent colour, in the bottom half the defaults are in place; this shows the difference.

AccentColourPlus

Panel and Dock appearance setting text inverted

When the panel or dock are in a manually set dark theme, the text in COSMIC Settings says Light. Clicking on Dark in the menu does nothing and clicking on Light switches to light theme but the text switches to Dark. Match desktop is not affected.
screenshot-2024-01-30-17-24-21
screenshot-2024-01-30-17-24-37

(Settings/Desktop/Wallpaper) Finite and non-deterministic selection of wallpapers

Recognizing that this is not the intended final design, one of the things I noticed while setting up Cosmic across an array of systems lately is that:

A) The Settings/Desktop/Wallpaper page only displays a 4x7, 3x9, or 2x12 arrays of wallpapers for selection. As a result, it is likely that a user added wallpaper is not selectable through the Wallpaper page, even if added to /usr/share/backgrounds/pop before first launching Cosmic. It also makes it impossible for a user added wallpaper to be rendered selectable after launching Settings/Desktop/Wallpaper, as the system caches the thumbnails, and even when deleting ~/.cache/cosmic-settings/wallpapers it seems to retain the cached order.

B) That across separate installs of Pop onto which Cosmic has also been installed, the order in which wallpaper options are displayed is non-deterministic. It seems that the presented selections are ordered numero-alphabetically based on the generated filenames for the cached thumbnails.

Taken in concert, these two facts mean only those wallpapers associated with the first 28 items in ~/.cache/cosmic-settings/wallpapers can ever be displayed. As we start seeing more traction, I could foresee this being the 3-inch tall hurdle that trips some people up as they go to play with Cosmic generally, especially in light of the advances on Settings/Desktop/Appearance and the customize-ability of the other UX elements.

This is also in comparison with Pop's implementation of Gnome and gnome-settings, where an arbitrary number of wallpapers can be displayed and those wallpapers are displayed in a deterministic order across installs (seemingly based on the numero-alphabetically sorted name of the wallpaper itself, as stored in /usr/share/backgrounds and /usr/share/backgrounds/pop)

Settings > Appearance: Light mode issues

  • Light mode activates in the settings app but not the rest of the desktop
  • After choosing light mode, then click "< Desktop", the window reverts to dark mode
  • Light mode active window accent does not change
  • Window management > active window hint size and gap size don't work in the light mode window

Settings > Input Devices > Touchpad

Touchpad settings in COSMIC's Settings application

The touchpad settings panel is where users can customize touchpad behaviors in a variety of ways. These settings will exist under "Input Devices" in COSMIC's Settings application.

Options on this page are organized by the type of interactivity with the touchpad, under the labels "Tapping and Pinching," "Scrolling", and "Swiping."

Notes for various values:

  • Primary button: Segmented control. Available when there are multiple buttons on the touchpad.
  • Touchpad speed: Slider with value. Values are on a scale from 1-100, where 1 and 100 are the minimum and maximum speeds we support, respectively. A marker exists at the default speed.
  • Enable touchpad acceleration: Note that we've added a caption to this list item to explain acceleration.
  • Double-click speed: A slider with a value labeled in milliseconds. A marker exists at the default double-click speed.

Under "Scrolling," scrolling speed will use a slider with a value on a scale from 0 to 100 similar to touchpad speed, where the values represent a linear scale from our supported minimum and maximum speeds.

In earlier releases, the "Swiping" area will document various three-finger and four-finger swipe actions.

Mockups in Figma

(Settings/Appearance) Attempting to Paste Values into Colour-Picker Causes Non-Responsiveness.

When using Settings > Appearance, copying hex values from the colour picker works as expected.

However, pasting any content causes the colour-picker window to appear to become entirely non-responsive, as does cosmic-settings.

If the workspace was tiling windows when the colour-picker and cosmic-settings windows are rendered non-reponsive, the screen will persist in showing the windows as they were in tiling mode, even if I toggle to floating mode.

(Here, the background shows the remnant of the tiled windows, despite the actual windows floating in the foreground)
Screenshot_2023-11-03_16-04-48

Further, other windows are effected. If at any point the workspace is in tiling mode while the colour-picker and cosmic-settings are non-responsive, other windows will also be visually non-reponsive. E.G. If I open a terminal, the terminal window may spawn correctly, but it will not update. Despite this, I can execute commands in the terminal.

If I kill the cosmic-session process (usually hopping to tty3 and using htop), these problems resolve.

(Settings/Desktop/Wallpaper) Per-Monitor Wallpaper setting logic incorrect.

I'm not sure how to best describe this, but the logic underpinning the wallpaper selector when trying to select wallpapers on a per-display basis does not function correctly. This is quite a pain to explain. This issue is for wallpapers and solid-colour backgrounds. All wallpapers/colours used are default and included Pop wallpapers.

Process

To avoid this being a pure wall of text, I'm going to separate what I'm doing into numbered steps. The state at the end of each step is displayed in this graphic.

  1. I have Displays A and B. On a fresh install of Pop with cosmic-session, I switch to Cosmic. Both displays default to Wallpaper 1 (ahmadrezasajadi-10140-edit)
  1. This default setup will be called, configuration A1 & B1
  1. I open cosmic-settings, and navigate to the Wallpaper. The page is non-responsive for a moment (I presume it's caching thumbnails) then, still with A1 & B1, displays:
  • Wallpaper 2's thumbnail (a thumbnail for nasa-53884) as preview
  • "Same background on all displays" set to true
  • "Background fit" set to Fit to Screen
  • "Slideshow" set to true
  • "Change image every" set to 5 minutes
  1. I set "Slideshow" to false. Displays now show A2 & B2.

This is the first place this issue shows something odd: The default wallpaper - which appears to be ahmadrezasajadi-10140-edit on all Cosmic installs - is not the selected preview in Settings/Desktop/Wallpaper. Instead, settings lists a subsection of all available wallpapers in a random order. I believe this order to be defined by the sequence in which the thumbnails for the wallpapers finish caching, but I am not positive. However, once "Slideshow" is set to false, the first wallpaper in the list - in this case nasa-53884 - is selected. Toggling "Slideshow" back to true returns Wallpaper 1 to the displays for a reason I can't figure out either.

  1. I set "Same background on all displays" to false. Still A2 & B2.
  1. I selected Display A from the newly exposed buttons. I select Wallpaper 3 (nasa-89125) for Display A. Now, I have the following (correct) result - A3 & B2. The Preview in the Settings/Desktop/Wallpaper page has the thumbnail for Wallpaper 3.
  1. I select the button for Display B. The Wallpapers switch. I now have A2 & B3. As long as I switch between Display A and Display B, the configuration will also switch. The Settings/Desktop/Wallpaper page's Preview continues to display the thumbnail for Wallpaper 3 throughout.

This seems to be the second place where I would consider wallpaper logic incorrect. I would expect, when selecting Display B, that the thumbnail should switch to the preview for the last set wallpaper on Display B. That would be Wallpaper 2. Instead, it maintains the current selection of Wallpaper 3 instead. I would also expect Wallpaper 3 to persist on Display A, but it doesn't, reverting back to the previously set Wallpaper 2.

  1. I settle on the configuration of step 7: A2 & B3, with the button for Display B selected.
  1. I select Wallpaper 4 (jasper-van-der-meij-97274-edit). This results in A2 & B4.
  1. I select Display A. This flips the wallpapers again, resulting in A4 &B2

At this point, the third part of this issue appears. I cannot generate a configuration which does not present Wallpaper 2 on one of the displays. Wallpaper 2 was the last wallpaper set before "Same background on all displays" was set to false. In order to set two different wallpapers I must

A) Have "Same background on all displays" set to true;
B) Select the first wall paper I wish to use;
C) Set "Same background on all displays" to false;
D) Select the display whose background I wish to change to a second wallpaper;
E) Select the second wallpaper.

This also means that it is impossible to set per-display backgrounds on any setup with more than 2 displays.

Input Devices panel first-round testing changes

  • Rename "Input" to "Input Devices"
  • Mouse > Remove Double-click speed
  • Mouse > Slowest Mouse speed is too slow when mouse acceleration is disabled. Start the bottom speed at 10% higher than its current speed.
  • Mouse > Scolling speed > remove first 10% and last 20%.
  • Touchpad > Touchpad Speed > Slowest speed is too slow when mouse acceleration is disabled and top too fast to be usable. Remove first 10% and last 10%.
  • Touchpad > remove double-click speed
  • Touchpad > add Disable while typing
  • Touchpad > Scrolling > Scolling speed > remove first 10% and last 20%
  • Touchpad > Scrolling > Add Two-finger/Edge scolling radio buttons (new design)
  • Touchpad > Add Click Behavior

Settings > Input Devices > Keyboard > Keyboard Shortcuts > Keyboard Shortcut Category

This page lists shortcuts and associated keybindings inside any keyboard shortcut category. Mockup shows "Move window" category as an example. One can access this page by clicking on any keyboard shortcut category on the Keyboard Shortcuts page.

keyboard-shortcut-category

Clicking on a shortcut should open ContextDrawer with keybindings for this shortcut action. Users should be able to remove any of the keybindings by clicking on Delete icon button. They should also be able to input the new keybinding by clicking on the Edit icon button or double clicking the shortcut to activate the input. Additionally, there is an option to "Add keybinding" that should allow users to enter the new keybinding by pressing the key combination on their keyboard.
move-window-down-add-keybinding

If the shortcut is a duplicate of the existing shortcut, show the following dialog after someone releases the keys of the keybinding when entering the shortcut.
Dialog-ShortcutDuplicate

Custom shortcuts

Custom shortcuts is a category of shortcuts that is empty be default. Below is the view when it is empty. Compared to other categories there is a button to โ€œAdd shortcutโ€.
keyboard-shortcut-category-custom

Clicking on "Add shortcut" opens ContextDrawer where a user can enter shortcut name, command for the shortcut and keybindings.
ContextDrawer-add-custom-shortcut

Mockups and more details in Figma.

Is the use of `css-classes` intentional?

.css_classes(vec!["search-bar-inactive".into()])

In GTK4, css-classes wipes out all other CSS classes on a widget when set, including the default ones. Depending on the widget this can completely break styling unless your styling substitutes it properly. Is this intentional?

If not, you should be using add_css_class()/remove_css_class().

Use the view macro for better readability

Out of curiosity, I had a look at the code and noticed a lot of the code like this:
https://github.com/pop-os/cosmic-settings/blob/master/src/ui/section.rs#L17

Even when using cascade it doesn't look very nice (at least to me) and the structure of the UI is somewhat hidden. With Relm4's view macro (that's even independent from Relm4 itself with the upcoming release), the code I've linked (line 17 to 37) would look roughly like this:

view! {
    row = ListBoxSelectionRow::new(S::NAME.into()) {
        add_css_class: "nav-element",
        set_margin_all: 8,
        set_child: entry_box = Some(&gtk4::Box) {
            set_orientation: Orientation::Horizontal,
            set_spacing: 8,
            set_margin_all: 10,
            append: icon = &Image::from_icon_name(Some(S::ICON)) {},
            append: label = Label {
                set_label: S::NAME
            }
        }
    }
}	

Cosmic DE Screen Magnifier implementation

Hi,
will Cosmic Develop it's own Screen Magnification Software or will it be using something lime kMag or the GNOME one?

The current issue with Pop!_OS, which I think uses the default GNOME Magnifier, is that it experiences lag and unreliability despite utilizing modern hardware, while simultaneously producing a bit blurry image.

Cosmic Desktop is in its early stages of development and currently, accessibility isn't near a top priority. However, I have high hopes that as the development progresses, the team will create an exceptional version that includes accessibility features. It is exciting to see what the future holds for Cosmic Desktop and I am looking forward to the advancements it will bring.

I'm not sure if I posted it in the right place.

(Settings/Appearance) Can't Move/Resize Colour Picker Window with Mouse

When using Settings > Appearance in either floating or tiling window mode, the colour picker window will launch, but the window cannot be moved or resized with the mouse. The colour picker itself, the close button, etc. are responsive.

In tiling mode, the colour picker window can be successfully moved and resized with keyboard commands.

This doesn't prevent the main cosmic-settings window being interacted with.

Desktop > Display - HiDPI screens offset too much when scaled

To reproduce:

Build using the AUR (git hash at time of report: r114.d1db7c4-1).
Have two displays set up side by side, scale both to 150%.
Try to move the mouse between them, fail to do so.

xrandr output suggests that what is happening is that the positioning of the other monitor is being offset by the unscaled resolution still (i.e., in the config, the two 4K displays I have are 2560x1440+0+0 and 2560x1440+3840+0 - I would have suggested that the correct screen position for monitor 2 in terms of xrandr would be 2560x1440+2560+0+0)

Let me know if you need additional testing or for me to patch a build via paru for testing.

Cargo lock is not updated

basically if you try to build this package though lets say the aur it will always fail with

error: failed to load source for dependency `cosmic-config`

Caused by:
  Unable to update https://github.com/pop-os/libcosmic//?branch=single-instance#8d9760f0

Caused by:
  object not found - no match for id (8d9760f0a2f03ac23a888e0d8992e3b14dadf45c); class=Odb (9); code=NotFound (-3)

Wallpaper Wrap-Up List

  • When slideshow is toggled on, start from the currently active wallpaper (rather than the first wallpaper in the list)
  • When Slideshow is toggled off, stay on the currently active wallpaper (rather than switching to the first wallpaper in the list)
  • Background fit: remove "Stretch:
  • Background fit: rename "Zoom" to "Fill"
  • Always default to "Fill"
  • Change the display selector from segmented control to the tabs widget (reasoning: tabs are like switching a page where settings inside the tab are applicable only to the selected tab - in this case, wallpaper on the display)
  • Wishlist - can we fade between wallpaper selections? Currently there's a flash to a dark background then to the wallpaper.
  • Wallpaper per display - clicking the second display flips the backgrounds (tested with two displays)
    To reproduce: set a different background for two displays. Click between the displays. The wallpaper flips on the display each time.

Settings > Region and Language

Implement without "Advanced Formatting" for MVP. Limitations with how Linux stores formats requires revisiting advanced formatting possible options.

-- Carl

Cosmic Settings External Plugins

There should be some way to load external settings menus and such for the settings menus.

Several possible approaches:

  1. embedded compositor. most complex option, but also the most versatile - each settings menu could be an individual executable, similar to the applets
  2. shared library - could just dlopen+dlsym (libloading) a function that returns a GtkBox or something and some metadata about like where it goes in the menu and stuff. (see: abi_stable)
  3. just build modules into the executable itself? least flexible, but the most "Rust-y" option.

French Translation

`app = Paramรจtres COSMIC

unknown = Inconnu

Desktop

desktop = Bureau

Desktop: Apparence

appearance = Apparence
.desc = Couleur d'accentuation et personalisation COSMIC

Desktop: Dock et Panneau

dock = Dock et Barre Supรฉrieure
.desc = Personnalisez la taille, les positions et plus encore pour le Dock et de la Barre Supรฉrieure.

Desktop: Notifications

notifications = Notifications
.desc = Ne pas dรฉranger, notifications รฉcran vรฉrouillรฉ, et paramรจtres par application.

Desktop: Options

desktop-options = Options Bureau
.desc = Action de la Touche Super, coins actifs, options du contrรดle des fenรชtres.

super-key-action = Action Touche Super
.launcher = Lanceur
.workspaces = Espaces de Travail
.applications = Applications

hot-corner = Coins Actifs
.top-left-corner = Activer le coin actif supรฉrieur gauche pour les Espaces de Travail

top-panel = Barre Supรฉrieure
.workspaces = Bouton afficher les espaces de travail
.applications = Bouton afficher les applications

window-controls = Contrรดles Fenรชtre
.minimize = Afficher le bouton Minimiser
.maximize = Afficher le Bouton Maximiser

Desktop: Wallpaper

wallpaper = Fond d'รฉcran
.desc = Image d'arriรจre plan, couleurs, et options de diaporama.
.same = Mรชme arriรจre-plan pour tous les รฉcrans
.fit = Ajustement de l'arriรจre-plan
.slide = Diaporama
.change = Changer d'image tous les

Desktop: Workspaces

workspaces = Espaces virtuel
.desc = Dรฉfinir le nombre, comportement et placement des espaces virtuel.

workspaces-behavior = Comportement de l'espace de travail
.dynamic = Espaces de travail dynamiques
.fixed = Nombre fixe d'espaces de travail

workspaces-multi-behavior = Comportement Multi-รฉcran
.span = Les espaces de travail couvrent les affichages
.separate = Les รฉcrans ont des espaces de travail sรฉparรฉs

Networking: Wired

wired = Filaire
.desc = Connexion filaire, profile de connexion

Networking: Online Accounts

online-accounts = Comptes en lignes
.desc = Ajouter Comptes en lignes, IMAP et SMTP, identifiants de connexion d'entreprise

Time & Language

time = Heure et Language
.desc = N/A

time-date = Date et Heure
.desc = Fuseau horraire, rรฉglage de l'heure automatique, et format de l'heure.
.auto = Rรฉgler automatiquement

time-zone = Fuseau Horraire
.auto = Fuseau horraire automatique
.auto-info = Nรฉcessite le service de localisation et accรจs ร  internet

time-format = Format date et heure
.twenty-four = 24 heures
.first = Premiers jour de la semaine

time-region = Rรฉgion et Language
.desc = Format dates, heures, et nombres basรฉs sur votre region

Sound

sound = Son
.desc = N/A

sound-output = Sortie
.volume = Volume de sortie
.device = Appareil de sortie
.level = Niveau de sortie
.config = Configuration
.balance = Balance

sound-input = Entrรฉe
.volume = Volume entrรฉe
.device = appareil d'entrรฉe
.level = niveau d'entrรฉe

sound-alerts = Alertes
.volume = Volumes d'alertes
.sound = Alertes sonores

sound-applications = Applications
.desc = Volumes et paramรจtres d'application

System

system = Systeme et Comptes

System: About

about = ร€ propos
.desc = Nom de l'appareil, information matรฉriel, paramรจtres par dรฉfaut du systรจme d'exploitation.

about-device = Nom de l'appareil
.desc = Ce nom apparaรฎt aux autres pรฉriphรฉriques rรฉseau ou bluetooth.

about-hardware = Matรฉriel
.model = Nom du matรฉriel
.memory = Mรฉmoire vive
.processor = Processeur
.graphics = Carte graphique
.disk-capacity = Capacitรฉ du disque

about-os = Systรจme d'exploitation
.os = Systรจme d'exploitation
.os-architecture = Architecture du systรจme d'exploitation
.desktop-environment = Environnement de bureau
.windowing-system = Systรจme de fenรชtrage

about-related = Paramรจtres associรฉs
.support = Obtenir de l'aide

System: Firmware

firmware = Micrologiciel
.desc = Dรฉtails micrologiciel.

System: Users

users = Utilisateurs
.desc = Authentication et connexion, รฉcran de vรฉrouillage.`

(Settings-> Mouse & Touchpad) No Touchpad settings to control number of lines to scroll.

Please include a graphical interface to control the number of lines to scroll on the touchpad settings. While the current touchpad settings provide a satisfactory experience, having a graphical interface would greatly enhance the user-friendliness and convenience of adjusting the scrolling behavior.

With a graphical interface, users would be able to easily fine-tune the scrolling speed and responsiveness to their personal preferences. This feature would be particularly valuable for individuals who rely heavily on touchpad navigation, such as designers, content creators, and those with limited mobility who benefit from touchpad accessibility options.

Feature request/brainstorming: Drawing tablet support

This was mentioned in #8, but I wanted to break this out specifically so as to not overwhelm that design thread with something that's not planned for the alpha.

I figured that since I had my arm tied to one of these things for a decade while working my way through college in graphic design, I could share my thoughts about configurable features, current Gnome support, and what support in COSMIC DE might look like. There are many brands of tablets, but Wacom is definitely the big dog, so starting with Wacom support seems sensible to me.

Features:

(Listed, in my estimation, from most important to least important.)

  • Mapping tablet to displays:
    Need to be able to map the tablet to a specific display. In my experience, it's not typical for multi-display setups to have the tablet mapped to the whole array of displays.

  • Letterboxing / force aspect ratio mapping to display(s):
    The aspect ratio of a display (or group of displays) rarely matches the aspect ratio of a tablet. An ultrawide, for example, would have much faster cursor movement from side to side, than it would top to bottom. If I force letterbox with this display, a region of the tablet will be unmapped, and only a region with an aspect ratio that matches that of the display will be used.
    * Note: For some reason, letterboxing is not allowed in Gnome unless the tablet is mapped to one specific display. Mapping to a single display is the most common use case anyway, so this limitation probably doesn't affect very many users.

  • Left handed mode:
    Many tablets have their buttons on one side of the drawing area. For lefties, that means their hand would rest on them while they draw. Left handed mode rotates the tablet's mapping by 180ยฐ so that the physical tablet can be rotated, putting the buttons on the right side instead of on the left.

  • Pen pressure feel:
    Usually a slider from "soft" to "firm". Pens with "erasers" on the back usually have a second slide for the eraser as well.

  • Stylus button mapping:
    Most styli have 2 buttons on them. Since left click is done by touching the stylus to the tablet, usually one of these is right click by default, and the second is frequently customized based off the user's workflow. 3D workflows often change it to middle click, and a digital painter may want it bound to Ctrl + Z, or a hotkey that summons a quick access menu for a particular application. As a stretch component to this item, some configurators support multiple profiles for individual applications. So if I want certain bindings in Blender and completely different bindings in Krita, the application I currently have focused is detected, and the bindings are adjusted accordingly.

  • Tablet button mapping:
    These tablets usually have buttons, sliders, or dials, which the user can remap to send certain commands or key combos. The dial either repeats a key combo, or is bound to a scroll, zoom, or rotate action. When properly set up, the user won't have to reach for their keyboard, which is otherwise competing with the tablet for desk space.

  • Tracking mode:
    There are two different tracking modes. Absolute/tablet tracking makes the position of the cursor on the screen correspond with the position of the pen on the tablet. If the pen is picked up and moved to a different location, the cursor snaps to that location. Relative/mouse tracking does not snap the cursor to a new position if the pen is picked up and moved, but movements do move the cursor, much like how picking up up an optical mouse off the desk and setting it in a different location on the desk should not change the cursor's position. In my opinion, relative tracking is simply and objectively the wrong way to use a tablet, but some people probably prefer it for some reason.

  • Test your settings:
    Most of the configuration tools I've seen have a small rectangular area that the user can draw black lines so they can test their pressure settings.

  • Move and resize the mapped region on the tablet:
    This is one that Gnome Control Center does not have, but one I remember from Wacom's customizer from Windows. The active region on a tablet should be resizeable and moved to any position on the drawing area of the tablet. This somewhat ties into letterboxing, but it's much less important, so I made it into its own item down here.

  • LED settings:
    These tablets sometimes have customizable LEDs on them. The Intuos4 tablets even have little OLED displays next to the buttons. Being able to configure LEDs and mini OLED displays would be a very nice feature, but definitely a low priority.

(Settings/Appearance) Colour Picker Doesn't Always Render Correctly in Tiling Mode

When using Settings > Appearance in tiling mode, the first time the colour-picker is launched - e.g. clicking on "Application or window background" - it renders correctly.
However, if a different colour setting is selected after without closing the first picker - e.g. clicking "Interface text tint" - the picker is render as stretched-to-fit the colour-picker's window space.
The window corrects after it is focused into.

First picker:
Screenshot_2023-11-03_15-15-08

Second picker:
Screenshot_2023-11-03_15-15-09

After focusing on the second picker:
Screenshot_2023-11-03_15-15-22

(Settings/Appearance) Translucent Colour Picker Window

When using Settings > Appearance in floating window mode, the color picker window will launch with a translucent background.

(Launched Translucent)
Screenshot_2023-11-03_15-06-29

The background is actively translucent whenever the main settings application window is not focused.

(Focused Browser)
Screenshot_2023-11-03_15-05-28

(Focused Settings)
Screenshot_2023-11-03_15-05-31

The background shows what's behind it dynamically (for example, I can watch a video in Firefox through the background).

(Video through background)
Screenshot_2023-11-03_15-04-55

This is only a problem in floated and not tiled mode.
I do not know if this is specific to the colour-picker window, or whether any window spawned by cosmic-settings would have the same issue - primarily because nothing else in settings currently spawns a new window.

Settings > Input Devices > Keyboard

Keyboard settings in COSMIC is where the user will be able to manage input sources and keyboard shortcuts.
keyboard

Input Sources

Users should be able to add Input sources by clicking on "Add input source" button at the bottom of the ListView with input sources. Clicking this button should bring up the ContextDrawer with the list of input sources and a search field to enable people to quickly find what they need.
keyboard-add-input-context-drawer

Users should be able to drag Input sources inside the ListView to rearrange them. Each input source should have a View-more icon button at the end of the list item that brings up the menu with options to move the item inside the list, view keyboard layout, removing the input source, and additional settings if they are available.
view-more-menu

The copy underneath the heading of the section specifies the keyboard binding for switching input sources. It should change here if one customizes it in keyboard shortcuts.

When there is more than one input source added Input Sources applet should be added to the Panel (see Panel configurations designs).

Special Character Key

Compose key setting is shown in this section. Clicking on the List item with Compose key should open the ContextDrawer with the options to set Compose key to a specific modifier.

Keyboard Shortcuts.

Clicking on "View and customize shortcuts" should take the user to the Keyboard Shortcuts page.

Fails to build due to "Unable to update smithay/client-toolkit"

When I try to build cosmic-settings I get:

[lufog@arch-pc cosmic-settings]$ cargo build
warning: some crates are on edition 2021 which defaults to `resolver = "2"`, but virtual workspaces default to `resolver = "1"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
    Updating git repository `https://github.com/smithay/client-toolkit//`
warning: spurious network error (3 tries remaining): failed to receive HTTP 200 response: got 404; class=Net (12)
warning: spurious network error (2 tries remaining): failed to receive HTTP 200 response: got 404; class=Net (12)
warning: spurious network error (1 tries remaining): failed to receive HTTP 200 response: got 404; class=Net (12)
error: failed to load source for dependency `smithay-client-toolkit`

Caused by:
  Unable to update https://github.com/smithay/client-toolkit//?rev=f49df45#f49df457

Caused by:
  failed to fetch into: /home/lufog/.cargo/git/db/_empty-f31853f5765173d8

Caused by:
  network failure seems to have happened
  if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
  https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli

Caused by:
  failed to receive HTTP 200 response: got 404; class=Net (12)

If I replace

[patch."https://github.com/Smithay/client-toolkit"]
sctk = { git = "https://github.com/smithay/client-toolkit//", package = "smithay-client-toolkit", rev = "f49df45"}

with

patch."https://github.com/Smithay/client-toolkit/1"]
sctk = { git = "https://github.com/smithay/client-toolkit/", package = "smithay-client-toolkit", rev = "f49df45"}

then everything builds without errors.

(Settings) Scrolling Not Functioning.

When attempting to scroll with either a scroll-wheel or two-finger scrolling, scrolling down is intermittent and scrolling up does not appear to work.

It also appears that scroll right works, but scroll left does not. This is visible with the Accent color options in settings/desktop/appearance

I am not sure if this worked prior to the latest changes to Cosmic-settings, but I do not recall problems with it, leading me to suspect this might be a regression.

Settings > Input Devices > Mouse

The mouse settings panel in COSMIC's Settings application

The mouse settings panel is where users can customize mouse behaviors in a variety of ways. These settings will exist under "Input Devices" in COSMIC's Settings application.

Notes for various values:

  • Primary button: Segmented control. Only available when there are multiple buttons on the mouse.
  • Mouse speed: Slider with value. Values are on a scale from 1-100, where 1 and 100 are the minimum and maximum speeds we support, respectively, mapped to a percentage. A marker exists at the default speed.
  • Enable mouse acceleration: Note that we've added a caption to this list item to explain acceleration.
  • Double-click speed: A slider with a value labeled in milliseconds. A marker exists at the default double-click speed.

For the mouse settings, "Scrolling" options are split off into a different section. "Scrolling speed" is using a similar relative scale as "mouse speed."

Mockups in Figma

(Settings/Desktop/Appearance) Color picker window size and scroll bar issues

I noticed that there are two small issues related to the default size of the color picker as it is spawned in floating-window mode.

The first is the default height of the window. When spawned, the default height is adequate to display the entire color picker interface only if the Recent Colors element is not present. If a color picker has been adjusted, so the Recent Colors element is present, then the Reset to default button will be largely forced out of view. I also noted that the color picker does not have a vertical scrollbar when this happens. Compare the top image, without the Recent Colors element, to the lower:
Screenshot_2024-01-16_10-43-25
Screenshot_2024-01-16_10-44-15

Additionally, if enough colours have been selected that the Recent Colors element requires a horizontal scrollbar, while the scrollbar appears, it is drawn in over the element itself:
Screenshot_2024-01-16_12-17-45

And, lastly, I noted that, when I adjust the horizontal width of the color picker window when the Recent Colors element was present, that the height of the window also adjusted itself:
Screenshot_2024-01-16_10-44-56
The window in this screenshot has had it's width increased manually by a few pixels. The window "self adjusted" its height by about 50 pixels, allowing all elements to be presented.

Adjusting the height doesn't resolve the issue with the horizontal scrollbar drawing over the Recent Colors element.

I've included both aspects, as they seem to be tied directly to how the window is drawn. The height issue is interesting to me; the fact that a vertical scrollbar doesn't appear, but that the window increases height to adequately show all elements when I independently adjust the width of the window makes me feel like somewhere in the background, the desired change in window size has been registered, but not actually executed.

But, given that the horizontal scrollbar appears not to draw correctly, I do also wonder if there is a vertical scrollbar, but it isn't being rendered correctly.

Layout responsiveness designs

Main elements of the window layout

  • Window
  • Window content
  • Window header
  • NavBar (set width, 280px default, could be set by an app)
  • Back button and page header
  • ContextDrawer (set width defined by the app, 480px if not defined, Settings as an example).

Breakpoints for the view without the ContextDrawer:

Narrow window width (single-column view).

  • Only one part of the layout is visible at a time - either main content area, or NavBar, or ContextDrawer.
  • The minimum padding for the sides of the content is 16px (left and right). Padding on the sides of the content inside the content area is 16px (@space_s) when the window is 360px width and 32px (@space_l) when it's wider.
  • When ContextDrawer or NavBar appear in the single-column view they should fill the width except for 8px padding to the window edges.
  • NavBar should be hidden if the focus is on main content (unless specified by the specific app like Settings, where if the user opens an app in the single-column view, it should open with the NavBar open).

narrow-window-width

One and a half column view

  • Minimum width is 481px.
  • Maximum width is 783px (determined based on the widths of the NavBar and ContextDrawer). It is those two widths plus 24px (8px padding on each side of the window and additional 8px spacing between NavBar and ContextDrawer) minus 1px.
  • Main content area is visible and takes the width of the window. NavBar and ContextDrawer slide above the main content but remain their respective set widths.
    If the app is open in this view or if the window was decreased to this width while NavBar was present, NavBar should hide. Individual apps should be able to make an exception - for example, if one opens Settings in this view, NavBar should be open.
  • When someone opens NavBar, there should be a scrim (overlay) darkening the content area of the window underneath the NavBar, even if it includes the ContextDrawer. That should signal that nothing else is clickable while NavBar is open. Clicking on any area of the scrim should close NavBar same as clicking on the NavHandle.
  • Padding on the sides of the content inside the content area is 48px (@space_xl).

one-and-a-half-column

Default width (two-column view)

  • Floating windows open in this width. If we need a specific width, let's say 920px if we need a specific width.
  • NavBar and content area are next to each other.
  • When ContextDrawer is present it should appear on top of the content.
  • Minimum window width = 784px (360px content +48px padding on each side + 280px NavBar + 8px padding on the left side of the NavBar). If apps set a different NavBar or ContextDrawer width, minimum width might differ and will need to be adjusted based on the NavBar width.
  • Maximum window width is 1365px.
  • Padding on the sides of the content inside the content area is 48px (@space_xl) when the NavBar is open and 64px (@space_xxl) when the NavBar is closed.

default-width-960

default-width-minimum

Wide window (three-column view).

  • Content area, NavBar and ContextDrawer are next to each other.
  • Minimum window width for this breakpoint is 1366. There is no maximum width. We should use screen edges as the natural barrier in cases when there is no other output in the direction the window is being resized in.
  • Padding on the sides of the content inside the content area is 64px (@space_xxl) with window width below 1920px and when the ContextDrawer is open. Spacing is 128px (@space_xxl) when the ContextDrawer is closed and when the window is 1920px width. If window content gets to its maximum width of 920px and the spacing gets to 128px and there is still more space in the content area, we should switch to centering the content automatically and therefore automatic spacing on the sides of the content (@space_center_horizontally).

wide-window-1440

wide-window-1920

User intent regarding NavBar

User intent matters in some cases when the window is being resized.

  • When the window is resized to a smaller width, the NavBar will hide regardless because page content has a higher priority.
    window-resizing-smaller
  • When the window is resized to a smaller width, then back to a larger width, keep track of the previous state of the NavBar:
    • If the user has NavBar open on a large window, show the NavBar again when getting back to a larger window.
    • If the user hides NavBar on a large window, keep the NavBar hidden when the window is back to a larger width.
  • When the window is being resized from small to large and the NavBar was open, keep it open.
    window-resizing-larger-NBopen

Remove settings from Desktop and Panel page

Remove some settings that aren't wired up yet:

  1. Hot corners aren't designed to work with auto-hiding panels and probably won't be for release.
  2. Top panel applets/options are now configured under Panels

remove_settings

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.