Adding configuration options to change spacing between icons and labels inside the buttons in the bar. (#30)
* Branch protection check. * Move button spacing config into the Configuration section instead of Theming. * Partially Resolves #26 - Added the ability to configure outer spacing on the bar. * Renamed all class names for buttons so they can be styled with margins. * Added configurable spacing to buttons. * Fixed styling for network module when using wifi. * Fixed ghost margins that occur when labels are disabled in the bar buttons. * Change the default page of the settings dialog to configuration.
This commit is contained in:
@@ -6,30 +6,32 @@ import { openMenu } from "../utils.js";
|
||||
const Bluetooth = () => {
|
||||
const btIcon = Widget.Label({
|
||||
label: bluetooth.bind("enabled").as((v) => v ? "" : ""),
|
||||
class_name: "bar-bt_icon",
|
||||
class_name: "bar-button-icon bluetooth",
|
||||
});
|
||||
|
||||
const btText = Widget.Label({
|
||||
label: Utils.merge([
|
||||
bluetooth.bind("enabled"),
|
||||
bluetooth.bind("connected_devices"),
|
||||
options.bar.bluetooth.label.bind("value")],
|
||||
(btEnabled, btDevices, showLabel) => {
|
||||
if (showLabel) {
|
||||
return btEnabled && btDevices.length ? ` Connected (${btDevices.length})`
|
||||
: btEnabled ? " On"
|
||||
: " Off"
|
||||
}
|
||||
return "";
|
||||
],
|
||||
(btEnabled, btDevices) => {
|
||||
return btEnabled && btDevices.length ? ` Connected (${btDevices.length})`
|
||||
: btEnabled ? "On"
|
||||
: "Off"
|
||||
|
||||
}),
|
||||
class_name: "bar-bt_label",
|
||||
class_name: "bar-button-label bluetooth",
|
||||
});
|
||||
|
||||
return {
|
||||
component: Widget.Box({
|
||||
class_name: "volume",
|
||||
children: [btIcon, btText],
|
||||
children: options.bar.bluetooth.label.bind("value").as((showLabel) => {
|
||||
if (showLabel) {
|
||||
return [btIcon, btText];
|
||||
}
|
||||
return [btIcon];
|
||||
}),
|
||||
}),
|
||||
isVisible: true,
|
||||
boxClass: "bluetooth",
|
||||
|
||||
Reference in New Issue
Block a user