Phrase-Editor has no typing cursor when using Gnome3 dark themes

Bug #1849992 reported by Lonnie Lee Best
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GNOME Tweaks
New
Undecided
Unassigned
autokey (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Autokey-gtk's phrase editor does not show a typing-cursor when you're running Ubuntu 19.10 with a dark theme. The script editor shows a typing cursor as expected, but you do not see a typing cursor when editing a "phrase".

Steps to reproduce:
1) Launch GNOME-TWEAKs:
sudo apt install gnome-tweaks ; gnome-tweaks &

2) Click "Appearance".

3) Under Themes > Applications, change it to "Adwaita-dark" or any other dark theme.

4) Launch Autokey-gtk
sudo apt install autokey-gtk ; autokey-gtk

5) In the left pane of Autokey-gtk, select any phrase (or create a new phrase) and then left-click your mouse at any point within the text.

Expected Result: You should see a typing cursor that allows you to use your arrow keys to navigate to any location within the text shown in the editor.

Actual Result: The typing cursor is completely invisible.

ProblemType: Bug
DistroRelease: Ubuntu 19.10
Package: autokey-gtk 0.90.4-1.1
ProcVersionSignature: Ubuntu 5.3.0-19.20-generic 5.3.1
Uname: Linux 5.3.0-19-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu8
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Sat Oct 26 15:28:37 2019
InstallationDate: Installed on 2019-10-19 (7 days ago)
InstallationMedia: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
PackageArchitecture: all
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: autokey
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Lonnie Lee Best (launchpad-startport) wrote :
summary: - Autokey-GTK : Can't see typing cursor when using Gnome dark themes
+ Autokey-GTK : Can't see typing cursor when using Gnome-Tweaks dark
+ themes
description: updated
description: updated
description: updated
description: updated
Revision history for this message
Lonnie Lee Best (launchpad-startport) wrote : Re: Autokey-GTK : Can't see typing cursor when using Gnome-Tweaks dark themes

The reason I've submitted this as an Autokey-GTK bug, is because this behavior doesn't happen in any other application I use upon using dark themes, except autokey-gtk.

Any suggestions for a work-around that would still allow me to use a dark theme? I see no configuration to address this.

Revision history for this message
Lonnie Lee Best (launchpad-startport) wrote :

Today, I can see the cursor again (for the first time since installing Ubuntu 19.10 and using a dark theme). I hope I'm not speaking too soon, but (right at this moment), it is working.

I don't expect this to last. If I stop seeing the cursor again, I'll try to think deeply about what changed. One thing that comes to mind, is that today I have a freshly rebooted computer, while often times I "suspend" my computer instead of just turning it off. Maybe the issue occurs after powering up from a suspended state; I've seen other graphical artifacts in the past from doing this.

I'll report back soon with a comment to let you know if this lasts.

Revision history for this message
Lonnie Lee Best (launchpad-startport) wrote :

This is still an issue.

There seems to be no issue with the script-editor in autokey; script editors shows a typing cursor as expected while using a dark theme.

However, the issue is with the phrase editor; it does NOT show a typing cursor while using a GNOME 3 dark theme.

Yesterday, I was mistaken. I edited a script and saw a typing cursor, but I didn't edit any phrases yesterday.

Today, as I edit phrases, I confirm that the issue remains. I will edit the issue to reflect this discovery.

description: updated
summary: - Autokey-GTK : Can't see typing cursor when using Gnome-Tweaks dark
- themes
+ Phrase-Editor has no typing cursor when using Gnome3 dark themes
Revision history for this message
Lonnie Lee Best (launchpad-startport) wrote :

I'm looking for a work-around here:
https://askubuntu.com/questions/1185289/

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in autokey (Ubuntu):
status: New → Confirmed
Revision history for this message
Lonnie Lee Best (launchpad-startport) wrote :

Ultimately, this remains a bug, because Autokey-GTK's phrase-editor does not inherit a dark background from dark themes, yet it does inherit cursor-color from dark themes.

Compare this to Autokey's script editor, it inherits both background-color and caret-color from dark themes.

Autokey-GTK's phrase-editor keeps a white background no matter what the theme says to do. Yet it complies with the caret-color specified by the themes.

Since the dark theme calls for a white cursor, white on white makes the caret-cursor invisible.

I was given a work-around here:
https://askubuntu.com/questions/1185289/

The work-around was to change the dark theme's caret color to a color that would show up on both light and dark backgrounds.

Since I'm using the Yaru-dark theme now, I changed the cursor color to red by appending the following text to the file /usr/share/themes/Yaru-dark/gtk-3.20/.gtk-dark.css :

*
{
        padding: 0;
        -GtkToolButton-icon-spacing: 4;
        -GtkTextView-error-underline-color: #cc0000;
        -GtkScrolledWindow-scrollbar-spacing: 0;
        -GtkToolItemGroup-expander-size: 11;
        -GtkWidget-text-handle-width: 20;
        -GtkWidget-text-handle-height: 24;
        -GtkDialog-button-spacing: 4;
        -GtkDialog-action-area-border: 0;
        outline-color: alpha(currentColor,0.3);
        outline-style: dashed; outline-offset: -3px;
        outline-width: 1px;
        -gtk-outline-radius: 3px;
        -gtk-secondary-caret-color: #456789;
        caret-color: red;
}

The key line above is
caret-color: red;

A similar work-around could be applied to the "Adwaita-dark" theme.

This work-around is not ideal, because all applications have to have this red caret-color, just so I can get Autokey-gtk to work with a dark theme.

Perhaps someone can modify the autokey-gtk code so that its phrase-editor acts like its script-editor with respect to inheriting both background-color AND caret-color from the GNOME 3 themes.

Revision history for this message
Lonnie Lee Best (launchpad-startport) wrote :

A more concise work-around has been updated here:
https://askubuntu.com/a/1185312/256054

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.