forked from Shinonome/dots-hyprland
Merge branch 'main' into hefty-hype
This commit is contained in:
@@ -162,11 +162,13 @@ Singleton {
|
|||||||
* @returns {Qt.rgba} The solved overlay color
|
* @returns {Qt.rgba} The solved overlay color
|
||||||
*/
|
*/
|
||||||
function solveOverlayColor(baseColor, targetColor, overlayOpacity) {
|
function solveOverlayColor(baseColor, targetColor, overlayOpacity) {
|
||||||
|
const bc = Qt.color(baseColor);
|
||||||
|
const tc = Qt.color(targetColor);
|
||||||
let invA = 1.0 - overlayOpacity;
|
let invA = 1.0 - overlayOpacity;
|
||||||
|
|
||||||
let r = (targetColor.r - baseColor.r * invA) / overlayOpacity;
|
let r = (tc.r - bc.r * invA) / overlayOpacity;
|
||||||
let g = (targetColor.g - baseColor.g * invA) / overlayOpacity;
|
let g = (tc.g - bc.g * invA) / overlayOpacity;
|
||||||
let b = (targetColor.b - baseColor.b * invA) / overlayOpacity;
|
let b = (tc.b - bc.b * invA) / overlayOpacity;
|
||||||
|
|
||||||
return Qt.rgba(clamp01(r), clamp01(g), clamp01(b), overlayOpacity);
|
return Qt.rgba(clamp01(r), clamp01(g), clamp01(b), overlayOpacity);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -291,6 +291,7 @@ PanelWindow {
|
|||||||
Quickshell.execDetached(command);
|
Quickshell.execDetached(command);
|
||||||
if (root.action == RegionSelection.SnipAction.Record || root.action == RegionSelection.SnipAction.RecordWithSound) {
|
if (root.action == RegionSelection.SnipAction.Record || root.action == RegionSelection.SnipAction.RecordWithSound) {
|
||||||
root.phase = RegionSelection.Phase.Post
|
root.phase = RegionSelection.Phase.Post
|
||||||
|
root.selectionMode = RegionSelection.SelectionMode.RectCorners
|
||||||
} else {
|
} else {
|
||||||
root.dismiss();
|
root.dismiss();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user