Small fixes

This commit is contained in:
crschnick 2023-08-09 05:51:57 +00:00
parent c84db86457
commit 06f62c96fb
8 changed files with 41 additions and 54 deletions

View file

@ -153,6 +153,7 @@ public abstract class StoreEntryComp extends SimpleComp {
name.apply(struc -> struc.get().setTextOverrun(OverrunStyle.CENTER_ELLIPSIS))
.apply(struc -> struc.get().setPadding(new Insets(5, 5, 5, 0)));
name.apply(s -> AppFont.header(s.get()));
name.styleClass("name");
return name;
}

View file

@ -1,11 +1,13 @@
package io.xpipe.app.core;
import io.xpipe.app.core.mode.OperationMode;
import io.xpipe.app.fxcomps.Comp;
import io.xpipe.app.issue.ErrorEvent;
import io.xpipe.app.issue.TrackEvent;
import io.xpipe.app.prefs.AppPrefs;
import io.xpipe.app.prefs.CloseBehaviourAlert;
import io.xpipe.app.util.ThreadHelper;
import io.xpipe.core.process.OsType;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.geometry.Rectangle2D;
@ -247,6 +249,15 @@ public class AppMainWindow {
contentR.prefWidthProperty().bind(stage.getScene().widthProperty());
contentR.prefHeightProperty().bind(stage.getScene().heightProperty());
if (OsType.getLocal().equals(OsType.LINUX)) {
stage.getScene().addEventFilter(KeyEvent.KEY_PRESSED, event -> {
if (event.getCode().equals(KeyCode.W) && event.isControlDown()) {
event.consume();
OperationMode.close();
}
});
}
stage.getScene().addEventHandler(KeyEvent.KEY_PRESSED, event -> {
if (AppProperties.get().isDeveloperMode() && event.getCode().equals(KeyCode.F6)) {
var newR = content.createRegion();

View file

@ -39,14 +39,14 @@ public class Shortcuts {
}
if (scene.get() != null) {
scene.get().removeEventHandler(KeyEvent.KEY_PRESSED, filter);
scene.get().removeEventFilter(KeyEvent.KEY_PRESSED, filter);
SHORTCUTS.remove(region);
scene.set(null);
}
if (s != null) {
scene.set(s);
s.addEventHandler(KeyEvent.KEY_PRESSED, filter);
s.addEventFilter(KeyEvent.KEY_PRESSED, filter);
}
});
}

View file

@ -50,7 +50,7 @@ public class DesktopShortcuts {
var base = DesktopHelper.getDesktopDirectory().resolve(name + ".app");
var content = String.format(
"""
#!/bin/bash
#!/usr/bin/env sh
"%s" open %s
""",
exec, target);

View file

@ -4,20 +4,17 @@
}
.store-entry-grid:failed .jfx-text-field {
-fx-text-fill: red;
-fx-text-fill: #ee4829;
}
.store-entry-grid:incomplete .jfx-text-field {
-fx-text-fill: gray;
.store-entry-grid:incomplete .name {
-fx-text-fill: #ee4829;
}
.store-entry-grid:incomplete .summary {
-fx-text-fill: gray;
-fx-text-fill: #ee4829;
}
.store-entry-grid:incomplete .information {
-fx-text-fill: gray;
}
.store-entry-grid:incomplete .date {
-fx-text-fill: gray;
-fx-text-fill: #ee4829;
}
.store-entry-grid:incomplete .icon {
-fx-opacity: 0.5;

View file

@ -5,32 +5,6 @@
.DESCRIPTION
Retrieves the XPipe msi for the latest or a specified version, and
downloads and installs the application to the local machine.
.NOTES
=====================================================================
Copyright 2023 Christopher Schnick
Copyright 2017 - 2020 Chocolatey Software, Inc, and the
original authors/contributors from ChocolateyGallery
Copyright 2011 - 2017 RealDimensions Software, LLC, and the
original authors/contributors from ChocolateyGallery
at https://github.com/chocolatey/chocolatey.org
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
=====================================================================
Environment Variables, specified as $env:NAME in PowerShell.exe and %NAME% in cmd.exe.
For an explicit version of XPipe, please set $env:xpipeVersion = 'versionnumber'
#>
[CmdletBinding(DefaultParameterSetName = 'Default')]
param(

View file

@ -186,22 +186,6 @@ return 0 2>/dev/null
check_architecture "$(uname -m)" || exit 1
if ! [ -x "$(command -v apt)" ] && ! [ -x "$(command -v rpm)" ] && [ -x "$(command -v pacman)" ]; then
info "Installing from AUR at https://aur.archlinux.org/xpipe.git"
rm -rf "/tmp/xpipe_aur" || true
git clone "https://aur.archlinux.org/xpipe.git" /tmp/xpipe_aur
cd "/tmp/xpipe_aur"
makepkg -si
launch
exit 0
fi
if ! [ -x "$(command -v apt)" ] && ! [ -x "$(command -v rpm)" ] && ! [ -x "$(command -v pacman)" ]; then
info "Installation is not supported on this system (no apt, rpm, pacman). Can you try a portable version of XPipe?"
info "https://github.com/xpipe-io/xpipe#portable"
exit 1
fi
repo="https://github.com/xpipe-io/xpipe"
version=
while getopts 'sv:' OPTION; do
@ -221,6 +205,26 @@ while getopts 'sv:' OPTION; do
esac
done
if ! [ -x "$(command -v apt)" ] && ! [ -x "$(command -v rpm)" ] && [ -x "$(command -v pacman)" ]; then
info "Installing from AUR at https://aur.archlinux.org/xpipe.git"
rm -rf "/tmp/xpipe_aur" || true
if [[ -z "$version" ]] ; then
git clone "https://aur.archlinux.org/xpipe.git" /tmp/xpipe_aur
else
git clone --branch "$version" "https://aur.archlinux.org/xpipe.git" /tmp/xpipe_aur
fi
cd "/tmp/xpipe_aur"
makepkg -si
launch
exit 0
fi
if ! [ -x "$(command -v apt)" ] && ! [ -x "$(command -v rpm)" ] && ! [ -x "$(command -v pacman)" ]; then
info "Installation is not supported on this system (no apt, rpm, pacman). Can you try a portable version of XPipe?"
info "https://github.com/xpipe-io/xpipe#portable"
exit 1
fi
download_archive="$(
download_release "$repo" "$version"
exit "$?"

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
which sdk
if [ $? -ne 0 ]; then