Sublime Forum

Adjusting padding/margins between items of quick panel items

#1

Please see screenshot of current/desired behaviour. The red arrows are the items I’m referring to in the title and would like to add padding to:


Which rule do I need to add in my .sublime-theme (using Adaptive) to adjust the padding between items within quick panel menu items? I have tried several things from the default theme file, e.g the spacing property:

{
	"class": "quick_panel_entry",
	"spacing": 1
}

I have tried setting that to higher values but cannot see any visible changes, even after restarting Sublime Text.

To recreate the list shown in the screenshot, use the following:

import sublime
import sublime_plugin


class ExampleCommand(sublime_plugin.TextCommand):
	def run(self, edit):
		print("test")

		menu_items = []
		
		for x in range(100):
			quick_panel_item = sublime.QuickPanelItem(
				"Lorem ipsum dolor sit amet",
				[
					"consectetur adipisicing elit",
					"sed do eiusmod tempor incididunt",
				],
				"[{}]".format(x),
			)

			menu_items.append(quick_panel_item)
		
		sublime.active_window().show_quick_panel(
			menu_items,
			None,
			sublime.KEEP_OPEN_ON_FOCUS_LOST,
		)

Thanks.

Edit: it seems the class I’m looking for is quick_panel_detail_label, however there doesn’t appear to be any way to adjust padding/margins. Am I missing something obvious here?

0 Likes

#2

B­u­­m­p­.

0 Likes