Merge pull request #48 from namecheap/merge-upstream-0.8.3
Merge upstream 0.8.3
324
.github/workflows/Linux-pack.yml
vendored
@@ -28,17 +28,28 @@ env:
|
||||
|
||||
jobs:
|
||||
deb-pack:
|
||||
name: ${{ matrix.dist.name }}
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
dist: [debian-10, ubuntu-20.04]
|
||||
dist:
|
||||
- {
|
||||
name: debian-10,
|
||||
os: debian,
|
||||
symbol: buster
|
||||
}
|
||||
- {
|
||||
name: ubuntu-20.04,
|
||||
os: ubuntu,
|
||||
symbol: focal
|
||||
}
|
||||
steps:
|
||||
- name: Checkout Source code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
# ref: master_nc_merge_upstream_test
|
||||
# ref: master
|
||||
- name: Set env & Print flameshot version
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -56,38 +67,33 @@ jobs:
|
||||
# flameshot-org/packpack or packpack/packpack
|
||||
repository: flameshot-org/packpack
|
||||
path: tools
|
||||
- name: Packaging on ${{ matrix.dist }}
|
||||
if: matrix.dist == 'debian-10'
|
||||
- name: Packaging on ${{ matrix.dist.name }}
|
||||
run: |
|
||||
cp -r $GITHUB_WORKSPACE/data/debian $GITHUB_WORKSPACE
|
||||
bash $GITHUB_WORKSPACE/tools/packpack
|
||||
mv $GITHUB_WORKSPACE/build/${PRODUCT}_${VERSION}-${RELEASE}_amd64.deb $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist }}.amd64.deb
|
||||
mv $GITHUB_WORKSPACE/build/${PRODUCT}_${VERSION}-${RELEASE}_amd64.deb $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist.name }}.amd64.deb
|
||||
env:
|
||||
OS: debian
|
||||
DIST: buster
|
||||
- name: Packaging on ${{ matrix.dist }}
|
||||
if: matrix.dist == 'ubuntu-20.04'
|
||||
OS: ${{ matrix.dist.os }}
|
||||
DIST: ${{ matrix.dist.symbol }}
|
||||
- name: SHA256Sum of ${{ matrix.dist.name }} package(daily build)
|
||||
run: |
|
||||
pwd
|
||||
ls -la
|
||||
cp -r $GITHUB_WORKSPACE/data/debian $GITHUB_WORKSPACE
|
||||
bash $GITHUB_WORKSPACE/tools/packpack
|
||||
mv $GITHUB_WORKSPACE/build/${PRODUCT}_${VERSION}-${RELEASE}_amd64.deb $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist }}.amd64.deb
|
||||
env:
|
||||
OS: ubuntu
|
||||
DIST: focal
|
||||
- name: SHA256Sum of ${{ matrix.dist }} package(daily build)
|
||||
run: |
|
||||
sha256sum $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist }}.amd64.deb
|
||||
sha256sum $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist }}.amd64.deb > $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist }}.amd64.deb.sha256sum
|
||||
echo "=============${{ matrix.dist }} sha256sum download link============"
|
||||
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist }}.amd64.deb.sha256sum)
|
||||
sha256sum $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist.name }}.amd64.deb
|
||||
sha256sum $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist.name }}.amd64.deb > $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist.name }}.amd64.deb.sha256sum
|
||||
echo "=============${{ matrix.dist.name }} sha256sum download link============"
|
||||
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist.name }}.amd64.deb.sha256sum)
|
||||
echo "========no operation for you can see link in the log console======="
|
||||
- name: Upload ${{ matrix.dist }} package(daily build)
|
||||
- name: Upload ${{ matrix.dist.name }} package(daily build)
|
||||
run: |
|
||||
echo "================${{ matrix.dist }} download link==============="
|
||||
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist }}.amd64.deb)
|
||||
echo "================${{ matrix.dist.name }} download link==============="
|
||||
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist.name }}.amd64.deb)
|
||||
echo "======no operation for you can see link in the log console====="
|
||||
- name: Artifact Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Linux-distribution-artifact
|
||||
path: |
|
||||
${{ github.workspace }}/build/${{ env.PRODUCT }}-*-${{ env.RELEASE }}.${{ matrix.dist.name }}.amd64.deb
|
||||
${{ github.workspace }}/build/${{ env.PRODUCT }}-*-${{ env.RELEASE }}.${{ matrix.dist.name }}.amd64.deb.sha256sum
|
||||
|
||||
deb-pack-extra:
|
||||
name: ubuntu-18.04(extra job to packaging deb)
|
||||
@@ -101,7 +107,7 @@ jobs:
|
||||
uses: actions/checkout@v1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
# ref: master_nc_merge_upstream_test
|
||||
# ref: master
|
||||
- name: Set env & Print flameshot version
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -149,33 +155,54 @@ jobs:
|
||||
mkdir -p $GITHUB_WORKSPACE/build
|
||||
sed -e "/cmake (>= 3.13~),/d" -i $GITHUB_WORKSPACE/debian/control
|
||||
dpkg-buildpackage -b
|
||||
cp $GITHUB_WORKSPACE/../${PRODUCT}_*_amd64.deb $GITHUB_WORKSPACE/build/${PRODUCT}_${VERSION}-${RELEASE}.ubuntu-18.04.amd64.deb
|
||||
# cp $GITHUB_WORKSPACE/../${PRODUCT}_${VERSION}-${RELEASE}_amd64.deb $GITHUB_WORKSPACE/build/${PRODUCT}_${VERSION}-${RELEASE}.ubuntu-18.04.amd64.deb
|
||||
cp $GITHUB_WORKSPACE/../${PRODUCT}_*-${RELEASE}_amd64.deb $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.ubuntu-18.04.amd64.deb
|
||||
- name: SHA256Sum of ubuntu-18.04 package(daily build)
|
||||
run: |
|
||||
sha256sum $GITHUB_WORKSPACE/build/${PRODUCT}_${VERSION}-${RELEASE}.ubuntu-18.04.amd64.deb
|
||||
sha256sum $GITHUB_WORKSPACE/build/${PRODUCT}_${VERSION}-${RELEASE}.ubuntu-18.04.amd64.deb > $GITHUB_WORKSPACE/build/${PRODUCT}_${VERSION}-${RELEASE}.ubuntu-18.04.amd64.deb.sha256sum
|
||||
sha256sum $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.ubuntu-18.04.amd64.deb
|
||||
sha256sum $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.ubuntu-18.04.amd64.deb > $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.ubuntu-18.04.amd64.deb.sha256sum
|
||||
echo "============ubuntu-18.04 sha256sum download link=============="
|
||||
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}_${VERSION}-${RELEASE}.ubuntu-18.04.amd64.deb.sha256sum)
|
||||
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.ubuntu-18.04.amd64.deb.sha256sum)
|
||||
echo "=====no operation for you can see link in the log console====="
|
||||
- name: Upload ubuntu-18.04 package(daily build)
|
||||
run: |
|
||||
echo "===================ubuntu-18.04 download link=================="
|
||||
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}_${VERSION}-${RELEASE}.ubuntu-18.04.amd64.deb)
|
||||
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.ubuntu-18.04.amd64.deb)
|
||||
echo "======no operation for you can see link in the log console====="
|
||||
- name: Artifact Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Linux-distribution-artifact
|
||||
path: |
|
||||
${{ github.workspace }}/build/*
|
||||
|
||||
rpm-pack:
|
||||
name: ${{ matrix.dist.name }}
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
dist: [fedora-31, fedora-32, opensuse-leap-15.2]
|
||||
dist:
|
||||
- {
|
||||
name: fedora-31,
|
||||
os: fedora,
|
||||
symbol: 31
|
||||
}
|
||||
- {
|
||||
name: fedora-32,
|
||||
os: fedora,
|
||||
symbol: 32
|
||||
}
|
||||
- {
|
||||
name: opensuse-leap-15.2,
|
||||
os: opensuse-leap,
|
||||
symbol: 15.2
|
||||
}
|
||||
steps:
|
||||
- name: Checkout Source code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
# ref: master_nc_merge_upstream_test
|
||||
# ref: master
|
||||
- name: Set env & Print flameshot version
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -193,67 +220,75 @@ jobs:
|
||||
# flameshot-org/packpack or packpack/packpack
|
||||
repository: flameshot-org/packpack
|
||||
path: tools
|
||||
- name: Packaging on ${{ matrix.dist }}
|
||||
if: matrix.dist == 'fedora-31'
|
||||
- name: Packaging on ${{ matrix.dist.name }}
|
||||
run: |
|
||||
cp -r $GITHUB_WORKSPACE/data/rpm $GITHUB_WORKSPACE
|
||||
bash $GITHUB_WORKSPACE/tools/packpack
|
||||
env:
|
||||
OS: fedora
|
||||
DIST: 31
|
||||
- name: Packaging on ${{ matrix.dist }}
|
||||
if: matrix.dist == 'fedora-32'
|
||||
OS: ${{ matrix.dist.os }}
|
||||
DIST: ${{ matrix.dist.symbol }}
|
||||
- name: Package Clean
|
||||
if: matrix.dist.os == 'fedora'
|
||||
run: |
|
||||
cp -r $GITHUB_WORKSPACE/data/rpm $GITHUB_WORKSPACE
|
||||
bash $GITHUB_WORKSPACE/tools/packpack
|
||||
env:
|
||||
OS: fedora
|
||||
DIST: 32
|
||||
- name: Packaging on ${{ matrix.dist }}
|
||||
if: matrix.dist == 'opensuse-leap-15.2'
|
||||
rm -f ${{ github.workspace }}/build/${{ env.PRODUCT }}-debuginfo-*.rpm
|
||||
rm -f ${{ github.workspace }}/build/${{ env.PRODUCT }}-debugsource-*.rpm
|
||||
rm -f ${{ github.workspace }}/build/${{ env.PRODUCT }}-*.src.rpm
|
||||
rm -f ${{ github.workspace }}/build/build.log
|
||||
- name: SHA256Sum of ${{ matrix.dist.name }} package(daily build)
|
||||
if: matrix.dist.os == 'fedora'
|
||||
run: |
|
||||
cp -r $GITHUB_WORKSPACE/data/rpm $GITHUB_WORKSPACE
|
||||
bash $GITHUB_WORKSPACE/tools/packpack
|
||||
env:
|
||||
OS: opensuse-leap
|
||||
DIST: 15.2
|
||||
- name: SHA256Sum of ${{ matrix.dist }} package(daily build)
|
||||
if: startsWith(matrix.dist, 'fedora')
|
||||
run: |
|
||||
sha256sum $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.fc*.${ARCH}.rpm
|
||||
sha256sum $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.fc*.${ARCH}.rpm > $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.fc*.${ARCH}.rpm.sha256sum
|
||||
sha256sum $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.fc*.${ARCH}.rpm
|
||||
sha256sum $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.fc*.${ARCH}.rpm > $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.fc${{ matrix.dist.symbol }}.${ARCH}.rpm.sha256sum
|
||||
echo "============${{ matrix.dist }} sha256sum download link============"
|
||||
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.fc*.${ARCH}.rpm.sha256sum)
|
||||
echo "=======no operation for you can see link in the log console======="
|
||||
- name: SHA256Sum of ${{ matrix.dist }} package(daily build)
|
||||
if: startsWith(matrix.dist, 'opensuse-leap')
|
||||
- name: SHA256Sum of ${{ matrix.dist.name }} package(daily build)
|
||||
if: matrix.dist.os == 'opensuse-leap'
|
||||
run: |
|
||||
sha256sum $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-lp*.${ARCH}.rpm
|
||||
sha256sum $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-lp*.${ARCH}.rpm > $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-lp*.${ARCH}.rpm.sha256sum
|
||||
mv $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-lp*.${ARCH}.rpm $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}-lp${{ matrix.dist.symbol }}.${ARCH}.rpm
|
||||
sha256sum $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}-lp${{ matrix.dist.symbol }}.${ARCH}.rpm
|
||||
sha256sum $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}-lp${{ matrix.dist.symbol }}.${ARCH}.rpm > $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}-lp${{ matrix.dist.symbol }}.${ARCH}.rpm.sha256sum
|
||||
echo "============${{ matrix.dist }} sha256sum download link==========="
|
||||
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-lp*.${ARCH}.rpm.sha256sum)
|
||||
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}-lp${{ matrix.dist.symbol }}.${ARCH}.rpm.sha256sum)
|
||||
echo "=======no operation for you can see link in the log console======"
|
||||
- name: Upload ${{ matrix.dist }} package(daily build)
|
||||
if: startsWith(matrix.dist, 'fedora')
|
||||
- name: Upload ${{ matrix.dist.name }} package(daily build)
|
||||
if: matrix.dist.os == 'fedora'
|
||||
run: |
|
||||
echo "================${{ matrix.dist }} download link==============="
|
||||
echo "================${{ matrix.dist.name }} download link==============="
|
||||
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.fc*.${ARCH}.rpm)
|
||||
echo "======no operation for you can see link in the log console====="
|
||||
- name: Upload ${{ matrix.dist }} package(daily build)
|
||||
if: startsWith(matrix.dist, 'opensuse-leap')
|
||||
- name: Upload ${{ matrix.dist.name }} package(daily build)
|
||||
if: matrix.dist.os == 'opensuse-leap'
|
||||
run: |
|
||||
echo "================${{ matrix.dist }} download link==============="
|
||||
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-lp*.${ARCH}.rpm)
|
||||
echo "================${{ matrix.dist.name }} download link==============="
|
||||
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}-lp${{ matrix.dist.symbol }}.${ARCH}.rpm)
|
||||
echo "======no operation for you can see link in the log console====="
|
||||
- name: Artifact Upload
|
||||
if: matrix.dist.os == 'fedora'
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Linux-distribution-artifact
|
||||
path: |
|
||||
${{ github.workspace }}/build/
|
||||
|
||||
- name: Artifact Upload
|
||||
if: matrix.dist.os == 'opensuse-leap'
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Linux-distribution-artifact
|
||||
path: |
|
||||
${{ github.workspace }}/build/${{ env.PRODUCT }}-*-lp${{ matrix.dist.symbol }}.${{ env.ARCH }}.rpm
|
||||
${{ github.workspace }}/build/${{ env.PRODUCT }}-*-lp${{ matrix.dist.symbol }}.${{ env.ARCH }}.rpm.sha256sum
|
||||
|
||||
appimage-pack:
|
||||
name: appimage
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout Source code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
# ref: master_nc_merge_upstream_test
|
||||
# ref: master
|
||||
- name: Set env & Print flameshot version
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -315,77 +350,95 @@ jobs:
|
||||
${APPIMAGE_DST_PATH}/
|
||||
|
||||
VERSION=${VERSION} $GITHUB_WORKSPACE/appimagetool ${APPIMAGE_DST_PATH}
|
||||
mv $GITHUB_WORKSPACE/Flameshot-${VERSION}-${ARCH}.AppImage $GITHUB_WORKSPACE/Flameshot-${VERSION}.${ARCH}.AppImage
|
||||
- name: SHA256Sum of appimage package(daily build)
|
||||
run: |
|
||||
sha256sum $GITHUB_WORKSPACE/Flameshot-${VERSION}-${ARCH}.AppImage
|
||||
sha256sum $GITHUB_WORKSPACE/Flameshot-${VERSION}-${ARCH}.AppImage > $GITHUB_WORKSPACE/Flameshot-${VERSION}-${ARCH}.AppImage.sha256sum
|
||||
sha256sum $GITHUB_WORKSPACE/Flameshot-${VERSION}.${ARCH}.AppImage
|
||||
sha256sum $GITHUB_WORKSPACE/Flameshot-${VERSION}.${ARCH}.AppImage > $GITHUB_WORKSPACE/Flameshot-${VERSION}.${ARCH}.AppImage.sha256sum
|
||||
echo "================appimage sha256sum download link==============="
|
||||
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/Flameshot-${VERSION}-${ARCH}.AppImage.sha256sum)
|
||||
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/Flameshot-${VERSION}.${ARCH}.AppImage.sha256sum)
|
||||
echo "======no operation for you can see link in the log console====="
|
||||
- name: Upload appimage package for daily build
|
||||
run: |
|
||||
echo "====================appimage download link====================="
|
||||
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/Flameshot-${VERSION}-${ARCH}.AppImage)
|
||||
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/Flameshot-${VERSION}.${ARCH}.AppImage)
|
||||
echo "======no operation for you can see link in the log console====="
|
||||
- name: Artifact Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Linux-distribution-artifact
|
||||
path: |
|
||||
${{ github.workspace }}/Flameshot-*.${{ env.ARCH }}.AppImage
|
||||
${{ github.workspace }}/Flameshot-*.${{ env.ARCH }}.AppImage.sha256sum
|
||||
|
||||
# flatpak-pack:
|
||||
# runs-on: ubuntu-20.04
|
||||
# steps:
|
||||
# - name: Checkout Source code
|
||||
# uses: actions/checkout@v2
|
||||
# with:
|
||||
# fetch-depth: 0
|
||||
## ref: master_nc_merge_upstream_test
|
||||
# - name: Set env & Print flameshot version
|
||||
# shell: bash
|
||||
# run: |
|
||||
# last_committed_tag=$(git tag -l --sort=-v:refname | head -1)
|
||||
# git_revno=$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)
|
||||
# git_hash=$(git rev-parse --short HEAD)
|
||||
# echo "=======FLAMESHOT VERSION========"
|
||||
# echo ${last_committed_tag:1}
|
||||
# echo "Details: ${last_committed_tag}+git${git_revno}.${git_hash}"
|
||||
# echo "================================"
|
||||
# echo ::set-env name=VERSION::$(echo ${last_committed_tag:1})
|
||||
# - name: Setup flatpak
|
||||
# run: |
|
||||
# sudo apt-get -y -qq update
|
||||
# sudo apt-get install -y flatpak flatpak-builder
|
||||
# - name: Setup Flathub
|
||||
# run: |
|
||||
# flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
# flatpak install -y --noninteractive flathub org.kde.Sdk//5.15 org.kde.Platform//5.15
|
||||
# - name: Packaging flatpak
|
||||
# run: |
|
||||
# BUNDLE="org.flameshot.flameshot_${VERSION}_${ARCH}.flatpak"
|
||||
# MANIFEST_PATH=$GITHUB_WORKSPACE/data/flatpak/org.flameshot.flameshot.yml
|
||||
# RUNTIME_REPO="https://flathub.org/repo/flathub.flatpakrepo"
|
||||
# APP_ID="org.flameshot.flameshot"
|
||||
# BRANCH="master_nc_merge_upstream_test"
|
||||
#
|
||||
# flatpak-builder --user --disable-rofiles-fuse --repo=repo --force-clean flatpak_app ${MANIFEST_PATH} --install-deps-from=flathub
|
||||
# flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${APP_ID} ${BRANCH}
|
||||
# - name: SHA256Sum of flatpak package(daily build)
|
||||
# run: |
|
||||
# sha256sum $GITHUB_WORKSPACE/org.flameshot.flameshot_${VERSION}_${ARCH}.flatpak
|
||||
# sha256sum $GITHUB_WORKSPACE/org.flameshot.flameshot_${VERSION}_${ARCH}.flatpak > $GITHUB_WORKSPACE/org.flameshot.flameshot_${VERSION}_${ARCH}.flatpak.sha256sum
|
||||
# echo "================flatpak sha256sum download link===================="
|
||||
# echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/org.flameshot.flameshot_${VERSION}_${ARCH}.flatpak.sha256sum)
|
||||
# echo "========no operation for you can see link in the log console======="
|
||||
# - name: Upload flatpak package(daily build)
|
||||
# run: |
|
||||
# echo "=====================flatpak download link====================="
|
||||
# echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/org.flameshot.flameshot_${VERSION}_${ARCH}.flatpak)
|
||||
# echo "======no operation for you can see link in the log console====="
|
||||
flatpak-pack:
|
||||
name: flatpak
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout Source code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
# ref: master
|
||||
- name: Set env & Print flameshot version
|
||||
shell: bash
|
||||
run: |
|
||||
last_committed_tag=$(git tag -l --sort=-v:refname | head -1)
|
||||
git_revno=$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)
|
||||
git_hash=$(git rev-parse --short HEAD)
|
||||
echo "=======FLAMESHOT VERSION========"
|
||||
echo ${last_committed_tag:1}
|
||||
echo "Details: ${last_committed_tag}+git${git_revno}.${git_hash}"
|
||||
echo "================================"
|
||||
echo ::set-env name=VERSION::$(echo ${last_committed_tag:1})
|
||||
- name: Setup flatpak
|
||||
run: |
|
||||
sudo apt-get -y -qq update
|
||||
sudo apt-get install -y flatpak flatpak-builder
|
||||
- name: Setup Flathub
|
||||
run: |
|
||||
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
flatpak install -y --noninteractive flathub org.kde.Sdk//5.15 org.kde.Platform//5.15
|
||||
- name: Packaging flatpak
|
||||
run: |
|
||||
BUNDLE="org.flameshot.flameshot_${VERSION}_${ARCH}.flatpak"
|
||||
MANIFEST_PATH=$GITHUB_WORKSPACE/data/flatpak/org.flameshot.flameshot.yml
|
||||
RUNTIME_REPO="https://flathub.org/repo/flathub.flatpakrepo"
|
||||
APP_ID="org.flameshot.flameshot"
|
||||
BRANCH="master"
|
||||
|
||||
flatpak-builder --user --disable-rofiles-fuse --repo=repo --force-clean flatpak_app ${MANIFEST_PATH} --install-deps-from=flathub
|
||||
flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${APP_ID} ${BRANCH}
|
||||
mv $GITHUB_WORKSPACE/org.flameshot.flameshot_${VERSION}_${ARCH}.flatpak $GITHUB_WORKSPACE/org.flameshot.flameshot-${VERSION}.${ARCH}.flatpak
|
||||
- name: SHA256Sum of flatpak package(daily build)
|
||||
run: |
|
||||
sha256sum $GITHUB_WORKSPACE/org.flameshot.flameshot-${VERSION}.${ARCH}.flatpak
|
||||
sha256sum $GITHUB_WORKSPACE/org.flameshot.flameshot-${VERSION}.${ARCH}.flatpak > $GITHUB_WORKSPACE/org.flameshot.flameshot-${VERSION}.${ARCH}.flatpak.sha256sum
|
||||
echo "================flatpak sha256sum download link===================="
|
||||
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/org.flameshot.flameshot-${VERSION}.${ARCH}.flatpak.sha256sum)
|
||||
echo "========no operation for you can see link in the log console======="
|
||||
- name: Upload flatpak package(daily build)
|
||||
run: |
|
||||
echo "=====================flatpak download link====================="
|
||||
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/org.flameshot.flameshot-${VERSION}.${ARCH}.flatpak)
|
||||
echo "======no operation for you can see link in the log console====="
|
||||
- name: Artifact Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Linux-distribution-artifact
|
||||
path: |
|
||||
${{ github.workspace }}/org.flameshot.flameshot-*.${{ env.ARCH }}.flatpak
|
||||
${{ github.workspace }}/org.flameshot.flameshot-*.${{ env.ARCH }}.flatpak.sha256sum
|
||||
|
||||
snap-pack:
|
||||
name: snap
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout Source code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
# ref: master_nc_merge_upstream_test
|
||||
# ref: master
|
||||
- name: Set env & Print flameshot version
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -402,16 +455,27 @@ jobs:
|
||||
id: snapcraft
|
||||
with:
|
||||
path: data
|
||||
- name: Rename snap name
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p $GITHUB_WORKSPACE/build
|
||||
cp ${{ steps.snapcraft.outputs.snap }} $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.amd64.snap
|
||||
- name: SHA256Sum of snap package(daily build)
|
||||
run: |
|
||||
sha256sum ${{ steps.snapcraft.outputs.snap }}
|
||||
sha256sum ${{ steps.snapcraft.outputs.snap }} > ${{ steps.snapcraft.outputs.snap }}.sha256sum
|
||||
sha256sum $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.amd64.snap
|
||||
sha256sum $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.amd64.snap > $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.amd64.snap.sha256sum
|
||||
echo "================snap sha256sum download link=================="
|
||||
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh ${{ steps.snapcraft.outputs.snap }}.sha256sum)
|
||||
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.amd64.snap.sha256sum)
|
||||
echo "=====no operation for you can see link in the log console====="
|
||||
- name: Upload snap package(daily build)
|
||||
run: |
|
||||
echo "=======================snap download link======================"
|
||||
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh ${{ steps.snapcraft.outputs.snap }})
|
||||
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.amd64.snap)
|
||||
echo "======no operation for you can see link in the log console====="
|
||||
|
||||
- name: Artifact Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Linux-distribution-artifact
|
||||
path: |
|
||||
${{ github.workspace }}/build/${{ env.PRODUCT }}-*-${{ env.RELEASE }}.amd64.snap
|
||||
${{ github.workspace }}/build/${{ env.PRODUCT }}-*-${{ env.RELEASE }}.amd64.snap.sha256sum
|
||||
|
||||
@@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.13)
|
||||
# This can be read from ${PROJECT_NAME} after project() is called
|
||||
project(
|
||||
flameshot
|
||||
VERSION 0.8.1.1
|
||||
VERSION 0.8.3.1
|
||||
LANGUAGES CXX)
|
||||
set(PROJECT_NAME_CAPITALIZED "Flameshot")
|
||||
|
||||
@@ -12,12 +12,17 @@ set(PROJECT_NAME_CAPITALIZED "Flameshot")
|
||||
set(DEFAULT_RUN_IN_PLACE FALSE)
|
||||
if(WIN32)
|
||||
set(DEFAULT_RUN_IN_PLACE TRUE)
|
||||
# For Windows RC file.
|
||||
add_definitions(-DFLAMESHOT_VERSION_MAJOR=${CMAKE_PROJECT_VERSION_MAJOR})
|
||||
add_definitions(-DFLAMESHOT_VERSION_MINOR=${CMAKE_PROJECT_VERSION_MINOR})
|
||||
add_definitions(-DFLAMESHOT_VERSION_BUGFIX=${CMAKE_PROJECT_VERSION_PATCH})
|
||||
add_definitions(-DFLAMESHOT_VERSION_BUILD=1)
|
||||
add_definitions(-DFLAMESHOT_VERSION_STRING="${PROJECT_VERSION}")
|
||||
endif()
|
||||
set(RUN_IN_PLACE ${DEFAULT_RUN_IN_PLACE} CACHE BOOL
|
||||
"Run directly in source directory structure")
|
||||
|
||||
|
||||
option(GENERATE_TS "Regenerate translation source files" OFF)
|
||||
option(GENERATE_TS "Regenerate translation source files" OFF)
|
||||
|
||||
include(cmake/StandardProjectSettings.cmake)
|
||||
|
||||
18
README.md
@@ -28,6 +28,10 @@
|
||||
<a href="https://flameshot.org">
|
||||
<img src="https://img.shields.io/github/release/flameshot-org/flameshot.svg?style=flat-square&label=docs" alt="Docs" />
|
||||
</a>
|
||||
<br>
|
||||
<a href="https://snapcraft.io/flameshot">
|
||||
<img alt="Get it from the Snap Store" src="https://snapcraft.io/static/images/badges/en/snap-store-black.svg" />
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -60,10 +64,8 @@
|
||||
- [Arch](#arch)
|
||||
- [Build](#build)
|
||||
- [Install](#install)
|
||||
- [Packaging](#packaging)
|
||||
- [License](#license)
|
||||
- [Contribute](#contribute)
|
||||
- [Donations](#donations)
|
||||
- [Acknowledgment](#acknowledgment)
|
||||
|
||||
## Features
|
||||
@@ -252,11 +254,10 @@ some Linux distributions:
|
||||
- [Ubuntu 18.04+](https://launchpad.net/ubuntu/+source/flameshot): `apt install flameshot`
|
||||
- [openSUSE](https://software.opensuse.org/package/flameshot)
|
||||
- [Void Linux](https://github.com/void-linux/void-packages/tree/master/srcpkgs/flameshot) (`xbps-install flameshot`)
|
||||
- [Docker](https://github.com/ManuelLR/docker-flameshot)
|
||||
- [Solus](https://dev.getsol.us/source/flameshot/): `eopkg it flameshot`
|
||||
- Fedora: `dnf install flameshot`
|
||||
- [Snap/Flatpak/AppImage](https://github.com/flameshotapp/packages)
|
||||
- [Solus](https://dev.getsol.us/source/flameshot/): `eopkg it flameshot`
|
||||
- Besides, generic packages available via [opensuse software repository](https://software.opensuse.org//download.html?project=home%3AVitzy&package=flameshot)
|
||||
- [Docker](https://github.com/ManuelLR/docker-flameshot)
|
||||
|
||||
<details>
|
||||
<summary>Expand this section to see what distros are using an up to date version of flameshot</summary>
|
||||
@@ -265,6 +266,13 @@ some Linux distributions:
|
||||
</a>
|
||||
</details>
|
||||
|
||||
### Tray icon
|
||||
|
||||
**Note** that for the Flameshot icon to appear in your tray area, you should have a systray software installed. This is especially true for users who use minimal [window managers](https://wiki.archlinux.org/index.php/window_manager) such as [dwm](https://dwm.suckless.org/). In some [Desktop Environment](https://wiki.archlinux.org/index.php/Desktop_environment) installations (e.g Gnome), the systray might be missing and you can install an application or plugin (e.g [Gnome shell extension](https://extensions.gnome.org/extension/1503/tray-icons/)) to add the systray to your setup. It has been [reported](https://github.com/flameshot-org/flameshot/issues/1009#issuecomment-700781081)) that icon of some softwares, including Flameshot, does not show in [gnome-shell-extension-appindicator](https://github.com/ubuntu/gnome-shell-extension-appindicator).
|
||||
|
||||
|
||||
Alternatively, in case you don't want to have a systray, you can always call Flameshot from the terminal. See [Usage section](#usage).
|
||||
|
||||
### S3 bucket configuration
|
||||
|
||||
S3 bucket credentials are placed in the file `config.ini` and cannot be configured with UI.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
flameshot (0.8.1-1) unstable; urgency=medium
|
||||
flameshot (0.8.3-1) unstable; urgency=medium
|
||||
|
||||
* New stable release.
|
||||
|
||||
-- Boyuan Yang <byang@debian.org> Wed, 23 Sep 2020 20:39:29 -0400
|
||||
-- Jeremy Borgman <borgman.jeremy@pm.me> Mon, 30 Sep 2020 09:18:29 -0600
|
||||
|
||||
47
data/flameshot.rc
Normal file
@@ -0,0 +1,47 @@
|
||||
#pragma code_page(65001) // UTF-8
|
||||
|
||||
IDI_ICON1 ICON "img\\app\\flameshot.ico"
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#define VER_FILEVERSION FLAMESHOT_VERSION_MAJOR,FLAMESHOT_VERSION_MINOR,FLAMESHOT_VERSION_BUGFIX,FLAMESHOT_VERSION_BUILD
|
||||
#define VER_FILEVERSION_STR FLAMESHOT_VERSION_STRING
|
||||
|
||||
#define VER_PRODUCTVERSION FLAMESHOT_VERSION_MAJOR,FLAMESHOT_VERSION_MINOR,FLAMESHOT_VERSION_BUGFIX,FLAMESHOT_VERSION_BUILD
|
||||
#define VER_PRODUCTVERSION_STR FLAMESHOT_VERSION_STRING
|
||||
|
||||
#ifndef DEBUG
|
||||
#define VER_DEBUG 0
|
||||
#else
|
||||
#define VER_DEBUG VS_FF_DEBUG
|
||||
#endif
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION VER_FILEVERSION
|
||||
PRODUCTVERSION VER_PRODUCTVERSION
|
||||
FILEFLAGSMASK VER_DEBUG
|
||||
FILEFLAGS VER_DEBUG
|
||||
FILEOS VOS__WINDOWS32
|
||||
FILETYPE VFT_APP
|
||||
FILESUBTYPE VFT2_UNKNOWN
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "The flameshot Org."
|
||||
VALUE "FileDescription", "Flameshot"
|
||||
VALUE "FileVersion", VER_FILEVERSION_STR
|
||||
VALUE "InternalName", "flameshot"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2017-2020 flameshot.org"
|
||||
VALUE "OriginalFilename", "flameshot.exe"
|
||||
VALUE "ProductName", "Flameshot"
|
||||
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
|
||||
END
|
||||
END
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x0409, 0x04b0 /* U.S. English (Unicode) */
|
||||
END
|
||||
END
|
||||
@@ -1 +0,0 @@
|
||||
IDI_ICON1 ICON DISCARDABLE "img/app/flameshot.ico"
|
||||
BIN
data/img/material/black/minus.png
Normal file
|
After Width: | Height: | Size: 181 B |
57
data/img/material/black/minus.svg
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
|
||||
sodipodi:docname="minus.svg"
|
||||
id="svg4"
|
||||
version="1.1"
|
||||
viewBox="0 0 24 24">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
inkscape:current-layer="svg4"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:cy="13.075889"
|
||||
inkscape:cx="14.554259"
|
||||
inkscape:zoom="22.388564"
|
||||
inkscape:pagecheckerboard="false"
|
||||
showgrid="false"
|
||||
id="namedview6"
|
||||
inkscape:window-height="1027"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0"
|
||||
guidetolerance="10"
|
||||
gridtolerance="10"
|
||||
objecttolerance="10"
|
||||
borderopacity="1"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff"
|
||||
inkscape:document-rotation="0" />
|
||||
<path
|
||||
style="stroke-width:1.65234;fill:#000000"
|
||||
sodipodi:nodetypes="ccccc"
|
||||
id="path2"
|
||||
fill="#ffffff"
|
||||
d="m 21.914037,10.34766 v 3.30468 c -7.15882,0 -15.2248669,0 -19.8280741,0 v -3.30468 c 6.609358,0 13.2187161,0 19.8280741,0 z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
BIN
data/img/material/black/plus.png
Normal file
|
After Width: | Height: | Size: 243 B |
57
data/img/material/black/plus.svg
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
viewBox="0 0 24 24"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="plus.svg"
|
||||
inkscape:version="1.0 (4035a4fb49, 2020-05-01)">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
inkscape:document-rotation="0"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1027"
|
||||
id="namedview6"
|
||||
showgrid="false"
|
||||
inkscape:pagecheckerboard="false"
|
||||
inkscape:zoom="23.066184"
|
||||
inkscape:cx="14.554259"
|
||||
inkscape:cy="13.075889"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg4" />
|
||||
<path
|
||||
d="M 13.65234,2.0859629 V 10.34766 h 8.261697 c 0,3.30468 0,0 0,3.30468 H 13.65234 v 8.261697 c -3.30468,0 0,0 -3.30468,0 V 13.65234 H 2.0859629 c 0,-3.30468 0,0 0,-3.30468 H 10.34766 V 2.0859629 c 3.30468,0 0,0 3.30468,0 z"
|
||||
fill="#ffffff"
|
||||
id="path2"
|
||||
sodipodi:nodetypes="ccccccccccccc"
|
||||
style="stroke-width:1.65234;fill:#000000" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
BIN
data/img/material/white/minus.png
Normal file
|
After Width: | Height: | Size: 192 B |
57
data/img/material/white/minus.svg
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
viewBox="0 0 24 24"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="minus.svg"
|
||||
inkscape:version="1.0 (4035a4fb49, 2020-05-01)">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
inkscape:document-rotation="0"
|
||||
pagecolor="#000000"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1027"
|
||||
id="namedview6"
|
||||
showgrid="false"
|
||||
inkscape:pagecheckerboard="false"
|
||||
inkscape:zoom="23.066184"
|
||||
inkscape:cx="14.554259"
|
||||
inkscape:cy="13.075889"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg4" />
|
||||
<path
|
||||
d="m 21.914037,10.34766 v 3.30468 c -7.15882,0 -15.2248669,0 -19.8280741,0 v -3.30468 c 6.609358,0 13.2187161,0 19.8280741,0 z"
|
||||
fill="#ffffff"
|
||||
id="path2"
|
||||
sodipodi:nodetypes="ccccc"
|
||||
style="stroke-width:1.65234" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
BIN
data/img/material/white/plus.png
Normal file
|
After Width: | Height: | Size: 255 B |
56
data/img/material/white/plus.svg
Normal file
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
|
||||
sodipodi:docname="plus.svg"
|
||||
id="svg4"
|
||||
version="1.1"
|
||||
viewBox="0 0 24 24">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
inkscape:current-layer="svg4"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:cy="13.075889"
|
||||
inkscape:cx="14.554259"
|
||||
inkscape:zoom="23.764313"
|
||||
inkscape:pagecheckerboard="false"
|
||||
showgrid="false"
|
||||
id="namedview6"
|
||||
inkscape:window-height="1027"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0"
|
||||
guidetolerance="10"
|
||||
gridtolerance="10"
|
||||
objecttolerance="10"
|
||||
borderopacity="1"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#000000" />
|
||||
<path
|
||||
style="stroke-width:1.65234"
|
||||
sodipodi:nodetypes="ccccccccccccc"
|
||||
id="path2"
|
||||
fill="#ffffff"
|
||||
d="M 13.65234,2.0859629 V 10.34766 h 8.261697 c 0,3.30468 0,0 0,3.30468 H 13.65234 v 8.261697 c -3.30468,0 0,0 -3.30468,0 V 13.65234 H 2.0859629 c 0,-3.30468 0,0 0,-3.30468 H 10.34766 V 2.0859629 c 3.30468,0 0,0 3.30468,0 z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 324 KiB After Width: | Height: | Size: 445 KiB |
@@ -1,5 +1,5 @@
|
||||
Name: flameshot
|
||||
Version: 0.8.1
|
||||
Version: 0.8.3
|
||||
Release: 1%{?dist}
|
||||
Summary: Powerful yet simple to use screenshot software
|
||||
Summary(eu-ES): Potente pero simple de usar software de capturas
|
||||
@@ -95,6 +95,8 @@ make %{?_smp_mflags}
|
||||
%{_datadir}/icons/hicolor
|
||||
|
||||
%changelog
|
||||
* Mon Sep 19 2020 Jeremy Borgman <borgman.jeremy@pm.me> - 0.8.3-1
|
||||
- Updated for flameshot 0.8.3
|
||||
* Mon Sep 07 2020 Zetao Yang <vitzys@outlook.com> - 0.8.0-1
|
||||
- Updated for flameshot 0.8.0
|
||||
- More details, please see https://flameshot.js.org/#/changelog?id=v080
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
# /snap/local/launchers
|
||||
|
||||
Here are the launchers, or wrapper programs to deal with some runtime-fixable
|
||||
problems for the snapped applications, like setting proper environmental
|
||||
variables in snap.
|
||||
|
||||
In convention launchers are named _something_-launch, for dealing certain
|
||||
problem with _something_, and usually can be called in a stacked manner to
|
||||
consolidate their modifications.
|
||||
|
||||
```yaml
|
||||
apps:
|
||||
_app_name_:
|
||||
command: foo-launch bar-launch _app_command_
|
||||
```
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This is the maintainence launcher for the snap, make necessary runtime
|
||||
# environment changes to make the snap work here. You may also insert security
|
||||
# confinement/deprecation/obsoletion notice of the snap here.
|
||||
|
||||
set \
|
||||
-o errexit \
|
||||
-o errtrace \
|
||||
-o nounset \
|
||||
-o pipefail
|
||||
|
||||
# gtk-common-themes support
|
||||
export QT_QPA_PLATFORMTHEME=gtk3
|
||||
# Correct the TMPDIR path for Chromium Framework/Electron to
|
||||
# ensure libappindicator has readable resources
|
||||
export TMPDIR=$XDG_RUNTIME_DIR
|
||||
# Coerce XDG_CURRENT_DESKTOP to Unity so that App Indicators
|
||||
# are used and do not fall back to Notification Area applets
|
||||
# or disappear completely.
|
||||
export XDG_CURRENT_DESKTOP=Unity
|
||||
|
||||
# Finally run the next part of the command chain
|
||||
exec "${@}"
|
||||
@@ -20,14 +20,14 @@ architectures:
|
||||
|
||||
apps:
|
||||
flameshot:
|
||||
adapter: full
|
||||
command: usr/bin/flameshot
|
||||
command: flameshot
|
||||
desktop: usr/share/applications/flameshot.desktop
|
||||
extensions:
|
||||
- kde-neon
|
||||
environment:
|
||||
DISABLE_WAYLAND: 1
|
||||
XDG_DATA_DIRS: $SNAP/share:$XDG_DATA_DIRS
|
||||
QT_QPA_PLATFORMTHEME: gtk3
|
||||
slots: [dbus-flameshot]
|
||||
plugs:
|
||||
- kde-frameworks-5-plug
|
||||
@@ -38,6 +38,7 @@ apps:
|
||||
- opengl
|
||||
- pulseaudio
|
||||
- wayland
|
||||
- unity7
|
||||
- x11
|
||||
|
||||
parts:
|
||||
|
||||
@@ -9,24 +9,7 @@ Contributions are welcome! Here's how you can help:
|
||||
|
||||
## Translations
|
||||
|
||||
Check this nice official documentation from Qt docs as it explains how to translate for a project written with Qt: https://doc.qt.io/qt-5/linguist-translators.html
|
||||
|
||||
#### Status:
|
||||
|
||||
| Language | Code | Status | Contributors |
|
||||
| --------------------- | ----- | ----------- | ------------ |
|
||||
| Spanish | es | :bookmark:v0.1.0 | [lupoDharkael](https://github.com/lupoDharkael) |
|
||||
| Catalan | ca | :bookmark:v0.5.0 | [joamuran](https://github.com/joamuran) |
|
||||
| Russian | ru | :bookmark:v0.5.1 | [Shatur95](https://github.com/Shatur95) |
|
||||
| Chinese (Simplified) | zh_CN | :bookmark:v0.5.1 | [copie](https://github.com/copie), [hosiet](https://github.com/hosiet) |
|
||||
| Chinese (Traditional) | zh_TW | :bookmark:v0.5.1 | [PeterDaveHello](https://github.com/PeterDaveHello) |
|
||||
| Turkish | tr | :bookmark:v0.5.1 | [oltulu](https://github.com/oltulu) |
|
||||
| Georgian | ge | :bookmark:v0.5.1 | [giogziro95](https://github.com/giogziro95) |
|
||||
| French | fr | :bookmark:v0.5.1 | [ld892012](https://github.com/ld892012) |
|
||||
| Polish | pl | :bookmark:v0.5.1 | [napcok](https://github.com/napcok) |
|
||||
| Serbian | sr | :bookmark:v0.6.0 | [cobisimo](https://github.com/cobisimo) |
|
||||
| Ukrainian | uk | :bookmark:v0.6.0 | [vboden](https://github.com/vboden) |
|
||||
| German | de | :bookmark:v0.6.0 | [DaVukovic](https://github.com/DaVukovic) |
|
||||
See [translation instructions](https://github.com/flameshot-org/translation-instruction).
|
||||
|
||||
## Code
|
||||
|
||||
|
||||
17
docs/Releasing.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Checklist for making a new release
|
||||
|
||||
These are the code changes that need to take place
|
||||
- [ ] Create and push git tag
|
||||
- [ ] Update version in CMakeLists.txt
|
||||
- [ ] Update version and changelog at data/debian/changelog
|
||||
- [ ] Update version and changelog at data/rpm/flameshot.spec
|
||||
- [ ] Update docs/appdata/flameshot.metainfo.xml
|
||||
|
||||
These are the steps for actually making the release
|
||||
- [ ] Download all binaries from CI run started from PR related to code changes shown above
|
||||
- [ ] Create sha256 for each binary and compare against sha256 shown in the CI to verify there was no corruption or inserted malware.
|
||||
- [ ] Create a new "New Release" in githhub and explain changes in release notes
|
||||
- [ ] Upload all binaries and sha's
|
||||
- [ ] Update change log on [website](https://github.com/flameshot-org/flameshot-org.github.io/) data/changelog.md
|
||||
- [ ] Update version on [website](https://github.com/flameshot-org/flameshot-org.github.io/blob/master/_coverpage.md)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<project_license>GPL-3.0-or-later</project_license>
|
||||
<name>Flameshot</name>
|
||||
<releases>
|
||||
<release version="0.8.3" date="2020-09-28"/>
|
||||
<release version="0.8.1" date="2020-09-23"/>
|
||||
<release version="0.8.0" date="2020-09-19"/>
|
||||
</releases>
|
||||
|
||||
@@ -21,11 +21,13 @@ Comment[sk]=Mocný, no tiež jednoduchý softvér na zachytávanie obrazovky.
|
||||
Comment[sr]=Једноставан, а моћан алат за снимање екрана
|
||||
Comment[uk]=Потужний простий у використанні додаток для створення знімків екрану.
|
||||
Comment[es]=Software de captura de pantalla potente y fácil de usar.
|
||||
Comment[de]=Einfache, umfängliche Sreenshot-Software
|
||||
Keywords=flameshot;screenshot;capture;shutter;
|
||||
Keywords[zh_CN]=flameshot;screenshot;capture;shutter;截图;屏幕;
|
||||
Keywords[fr]=flameshot;capture d'écran;capter;shutter;
|
||||
Keywords[ja]=flameshot;screenshot;capture;shutter;スクリーンショット;キャプチャー;
|
||||
Keywords[es]=flameshot;screenshot;capture;shutter;captura;
|
||||
Keywords[de]=flameshot;screenshot;Bildschirmfoto;Aufnahme;
|
||||
Exec=flameshot
|
||||
Icon=flameshot
|
||||
Terminal=false
|
||||
@@ -48,6 +50,7 @@ Name[sk]=Nastaviť
|
||||
Name[sr]=Подешавања
|
||||
Name[uk]=Налаштувати
|
||||
Name[es]=Configurar
|
||||
Name[de]=Einstellungen
|
||||
Exec=flameshot config
|
||||
|
||||
[Desktop Action Capture]
|
||||
@@ -61,6 +64,7 @@ Name[sk]=Zachytiť obrazovku
|
||||
Name[sr]=Сними екран
|
||||
Name[uk]=Зробити знімок
|
||||
Name[es]=Tomar captura de pantalla
|
||||
Name[de]=Bildschirmfoto aufnehmen
|
||||
Exec=flameshot gui --delay 500
|
||||
|
||||
[Desktop Action Launcher]
|
||||
|
||||
@@ -67,7 +67,7 @@ target_sources(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../external/Qt-Color-Widgets/src/color_wheel.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../external/Qt-Color-Widgets/include/color_wheel.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../data/graphics.qrc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../data/icon.rc # windows binary icon resource file
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../data/flameshot.rc # windows binary icon resource file
|
||||
${QM_FILES}
|
||||
main.cpp)
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ target_sources(
|
||||
filenameeditor.cpp
|
||||
geneneralconf.cpp
|
||||
strftimechooserwidget.cpp
|
||||
styleoverride.cpp
|
||||
uicoloreditor.cpp
|
||||
visualseditor.cpp
|
||||
shortcutswidget.cpp
|
||||
|
||||
16
src/config/styleoverride.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// Created by jeremy on 9/24/20.
|
||||
//
|
||||
#include "styleoverride.h"
|
||||
|
||||
int StyleOverride::styleHint(StyleHint hint,
|
||||
const QStyleOption* option,
|
||||
const QWidget* widget,
|
||||
QStyleHintReturn* returnData) const
|
||||
{
|
||||
if (hint == SH_ToolTip_WakeUpDelay) {
|
||||
return 600;
|
||||
} else {
|
||||
return baseStyle()->styleHint(hint, option, widget, returnData);
|
||||
}
|
||||
}
|
||||
21
src/config/styleoverride.h
Normal file
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// Created by jeremy on 9/24/20.
|
||||
//
|
||||
|
||||
#ifndef FLAMESHOT_STYLEOVERRIDE_H
|
||||
#define FLAMESHOT_STYLEOVERRIDE_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QProxyStyle>
|
||||
|
||||
class StyleOverride : public QProxyStyle
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
int styleHint(StyleHint hint,
|
||||
const QStyleOption* option = Q_NULLPTR,
|
||||
const QWidget* widget = Q_NULLPTR,
|
||||
QStyleHintReturn* returnData = Q_NULLPTR) const;
|
||||
};
|
||||
|
||||
#endif // FLAMESHOT_STYLEOVERRIDE_H
|
||||
@@ -277,7 +277,7 @@ void Controller::sendTrayNotification(const QString& text,
|
||||
{
|
||||
if (m_trayIcon) {
|
||||
m_trayIcon->showMessage(
|
||||
title, text, QSystemTrayIcon::Information, timeout);
|
||||
title, text, QIcon(":img/app/flameshot.svg"), timeout);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include "singleapplication.h"
|
||||
#include "src/cli/commandlineparser.h"
|
||||
#include "src/config/styleoverride.h"
|
||||
#include "src/core/capturerequest.h"
|
||||
#include "src/core/controller.h"
|
||||
#include "src/utils/confighandler.h"
|
||||
@@ -47,6 +48,7 @@ int main(int argc, char* argv[])
|
||||
// no arguments, just launch Flameshot
|
||||
if (argc == 1) {
|
||||
SingleApplication app(argc, argv);
|
||||
QApplication::setStyle(new StyleOverride);
|
||||
|
||||
QTranslator translator, qtTranslator;
|
||||
QStringList trPaths = PathInfo::translationsPaths();
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
// along with Flameshot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "circlecounttool.h"
|
||||
#include "colorutils.h"
|
||||
#include <QPainter>
|
||||
namespace {
|
||||
#define PADDING_VALUE 2
|
||||
@@ -72,6 +73,7 @@ void CircleCountTool::process(QPainter& painter,
|
||||
auto new_font = orig_font;
|
||||
auto fontSize = bubble_size;
|
||||
new_font.setPixelSize(fontSize);
|
||||
new_font.setBold(true);
|
||||
painter.setFont(new_font);
|
||||
|
||||
QRect bRect =
|
||||
@@ -89,8 +91,7 @@ void CircleCountTool::process(QPainter& painter,
|
||||
textRect, Qt::AlignCenter, QString::number(m_count));
|
||||
}
|
||||
|
||||
// Lightness value ranges from 0-255, we split at 75 as this looks best
|
||||
if (m_color.lightness() <= 75) {
|
||||
if (ColorUtils::colorIsDark(m_color)) {
|
||||
painter.setPen(Qt::white);
|
||||
} else {
|
||||
painter.setPen(Qt::black);
|
||||
|
||||
@@ -22,15 +22,18 @@
|
||||
#include "src/widgets/notificationwidget.h"
|
||||
#include <QApplication>
|
||||
#include <QClipboard>
|
||||
#include <QCursor>
|
||||
#include <QDesktopServices>
|
||||
#include <QDrag>
|
||||
#include <QHBoxLayout>
|
||||
#include <QGuiApplication>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QLabel>
|
||||
#include <QMimeData>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QPushButton>
|
||||
#include <QRect>
|
||||
#include <QScreen>
|
||||
#include <QShortcut>
|
||||
#include <QTimer>
|
||||
#include <QUrlQuery>
|
||||
@@ -58,6 +61,13 @@ void ImgUploader::init(const QString& title, const QString& label)
|
||||
setWindowTitle(title);
|
||||
setWindowIcon(QIcon(":img/app/flameshot.svg"));
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||
QRect position = frameGeometry();
|
||||
QScreen* screen = QGuiApplication::screenAt(QCursor::pos());
|
||||
position.moveCenter(screen->availableGeometry().center());
|
||||
move(position.topLeft());
|
||||
#endif
|
||||
|
||||
m_spinner = new LoadSpinner(this);
|
||||
m_spinner->setColor(ConfigHandler().uiMainColorValue());
|
||||
m_spinner->start();
|
||||
|
||||
@@ -24,11 +24,8 @@ inline qreal getColorLuma(const QColor& c)
|
||||
|
||||
bool ColorUtils::colorIsDark(const QColor& c)
|
||||
{
|
||||
bool isWhite = false;
|
||||
if (getColorLuma(c) <= 0.60) {
|
||||
isWhite = true;
|
||||
}
|
||||
return isWhite;
|
||||
// when luma <= 0.5, we considor it as a dark color
|
||||
return getColorLuma(c) <= 0.5;
|
||||
}
|
||||
|
||||
QColor ColorUtils::contrastColor(const QColor& c)
|
||||
|
||||
@@ -90,7 +90,10 @@ QPixmap ScreenGrabber::grabEntireDesktop(bool& ok)
|
||||
|
||||
QRect geometry;
|
||||
for (QScreen* const screen : QGuiApplication::screens()) {
|
||||
geometry = geometry.united(screen->geometry());
|
||||
QRect scrRect = screen->geometry();
|
||||
scrRect.moveTo(scrRect.x() / screen->devicePixelRatio(),
|
||||
scrRect.y() / screen->devicePixelRatio());
|
||||
geometry = geometry.united(scrRect);
|
||||
}
|
||||
|
||||
QPixmap p(QApplication::primaryScreen()->grabWindow(
|
||||
|
||||
@@ -108,6 +108,7 @@ CaptureTool* CaptureToolButton::tool() const
|
||||
|
||||
void CaptureToolButton::setColor(const QColor& c)
|
||||
{
|
||||
m_mainColor = c;
|
||||
CaptureButton::setColor(c);
|
||||
updateIcon();
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#include "src/tools/storage/storagemanager.h"
|
||||
#include "src/tools/toolfactory.h"
|
||||
#include "src/utils/colorutils.h"
|
||||
#include "src/utils/globalvalues.h"
|
||||
#include "src/utils/screengrabber.h"
|
||||
#include "src/utils/screenshotsaver.h"
|
||||
#include "src/utils/systemnotification.h"
|
||||
@@ -39,17 +38,14 @@
|
||||
#include "src/widgets/orientablepushbutton.h"
|
||||
#include "src/widgets/panel/sidepanelwidget.h"
|
||||
#include <QApplication>
|
||||
#include <QBuffer>
|
||||
#include <QDesktopWidget>
|
||||
#include <QGuiApplication>
|
||||
#include <QMouseEvent>
|
||||
#include <QPaintEvent>
|
||||
#include <QPainter>
|
||||
#include <QScreen>
|
||||
#include <QShortcut>
|
||||
#include <QUndoView>
|
||||
#include <draggablewidgetmaker.h>
|
||||
|
||||
// CaptureWidget is the main component used to capture the screen. It contains
|
||||
// an area of selection with its respective buttons.
|
||||
|
||||
@@ -128,6 +124,8 @@ CaptureWidget::CaptureWidget(const uint id,
|
||||
if (m_context.fullscreen) {
|
||||
for (QScreen* const screen : QGuiApplication::screens()) {
|
||||
QRect r = screen->geometry();
|
||||
r.moveTo(r.x() / screen->devicePixelRatio(),
|
||||
r.y() / screen->devicePixelRatio());
|
||||
#ifdef Q_OS_WIN
|
||||
r.moveTo(r.topLeft() - topLeft);
|
||||
#endif
|
||||
@@ -655,6 +653,10 @@ void CaptureWidget::initPanel()
|
||||
QRect panelRect = rect();
|
||||
if (m_context.fullscreen) {
|
||||
panelRect = QGuiApplication::primaryScreen()->geometry();
|
||||
auto devicePixelRatio =
|
||||
QGuiApplication::primaryScreen()->devicePixelRatio();
|
||||
panelRect.moveTo(panelRect.x() / devicePixelRatio,
|
||||
panelRect.y() / devicePixelRatio);
|
||||
}
|
||||
|
||||
ConfigHandler config;
|
||||
@@ -663,6 +665,7 @@ void CaptureWidget::initPanel()
|
||||
auto* panelToggleButton =
|
||||
new OrientablePushButton(tr("Tool Settings"), this);
|
||||
makeChild(panelToggleButton);
|
||||
panelToggleButton->setColor(m_uiColor);
|
||||
panelToggleButton->setOrientation(
|
||||
OrientablePushButton::VerticalBottomToTop);
|
||||
panelToggleButton->move(panelRect.x(),
|
||||
@@ -1104,6 +1107,11 @@ void CaptureWidget::uploadScreenshot()
|
||||
void CaptureWidget::copyScreenshot()
|
||||
{
|
||||
m_captureDone = true;
|
||||
if (m_activeTool != nullptr) {
|
||||
QPainter painter(&m_context.screenshot);
|
||||
m_activeTool->process(painter, m_context.screenshot, true);
|
||||
}
|
||||
|
||||
ScreenshotSaver().saveToClipboard(pixmap());
|
||||
close();
|
||||
}
|
||||
@@ -1111,6 +1119,10 @@ void CaptureWidget::copyScreenshot()
|
||||
void CaptureWidget::saveScreenshot()
|
||||
{
|
||||
m_captureDone = true;
|
||||
if (m_activeTool != nullptr) {
|
||||
QPainter painter(&m_context.screenshot);
|
||||
m_activeTool->process(painter, m_context.screenshot, true);
|
||||
}
|
||||
hide();
|
||||
if (m_context.savePath.isEmpty()) {
|
||||
ScreenshotSaver().saveToFilesystemGUI(pixmap());
|
||||
@@ -1145,4 +1157,4 @@ QRect CaptureWidget::extendedRect(QRect* r) const
|
||||
r->top() * devicePixelRatio,
|
||||
r->width() * devicePixelRatio,
|
||||
r->height() * devicePixelRatio);
|
||||
}
|
||||
}
|
||||