jamiewilson / predawn

Predawn is a dark interface and syntax theme for Sublime Text and Atom.
http://jamiewilson.io/predawn
MIT License
1.8k stars 161 forks source link

Predawn quick panel width/margin/padding bug #138

Open mattst opened 8 years ago

mattst commented 8 years ago

Hi,

There is a bug in the Predawn quick panel width, margin, or padding fields (or something related to those).

System

The screen captures below are with the setting predawn_quick_panel_small set to true but exactly the same thing occurs when that setting is set to false.

Description

When the text length of the longest row in the quick panel gets longer than 42 characters, the end of the displayed text gets truncated.

Sublime Text automatically resizes the width of the quick panel so that text gets fully displayed, up to a maximum text length of just over 100 characters. One of the Predawn theme fields is preventing this from happening properly. I suspect it is being caused by one of the margin or padding fields.

The following screen captures show how Predawn truncates the last few characters of the text in the longest row of the quick panel and then shows how the same thing does not happen with the Sublime Text default theme.

predawn_panel_width_bug_01 predawn_panel_width_bug_02 predawn_panel_width_bug_03 predawn_panel_width_bug_04 predawn_panel_width_bug_05 predawn_panel_width_bug_06 predawn_panel_width_bug_07 predawn_panel_width_bug_08 predawn_panel_width_bug_09 predawn_panel_width_bug_10 st_default_theme_panel_width_01 st_default_theme_panel_width_02 st_default_theme_panel_width_03 st_default_theme_panel_width_04 st_default_theme_panel_width_05 st_default_theme_panel_width_06 st_default_theme_panel_width_07 st_default_theme_panel_width_08 st_default_theme_panel_width_09 st_default_theme_panel_width_10

Plugin For Testing

I've created a ST plugin QuickPanelBugDemo.py and uploaded it to GitHub to help with fixing this bug. All it does is open the quick panel with some long text entries, selecting one does nothing.

Click the raw link on the right and save the file to your Sublime Text config Packages/User/ folder, or use this direct link.

The ST Command is quick_panel_bug_demo.

Run from the console with the command:

window.run_command("quick_panel_bug_demo")

Or assign it to a key binding using:

{ "keys": ["ctrl+whatever"], "command": "quick_panel_bug_demo" }

Hope this helps. Thanks.