mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-12-05 16:51:07 -07:00
Merge branch 'SoftFever:main' into Pressure-equalizer
This commit is contained in:
commit
de39b2c333
3 changed files with 33 additions and 4 deletions
20
.github/workflows/build_orca.yml
vendored
20
.github/workflows/build_orca.yml
vendored
|
|
@ -157,6 +157,11 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
choco install nsis
|
choco install nsis
|
||||||
|
|
||||||
|
- name: Check signtool.exe
|
||||||
|
if: matrix.os == 'windows-2019'
|
||||||
|
run: |
|
||||||
|
"C:/Program Files (x86)/Microsoft SDKs/ClickOnce/SignTool/signtool.exe/signtool.exe"
|
||||||
|
|
||||||
- name: download deps
|
- name: download deps
|
||||||
if: matrix.os == 'windows-2019'
|
if: matrix.os == 'windows-2019'
|
||||||
shell: powershell
|
shell: powershell
|
||||||
|
|
@ -200,8 +205,21 @@ jobs:
|
||||||
|
|
||||||
- name: Create installer Win
|
- name: Create installer Win
|
||||||
if: matrix.os == 'windows-2019'
|
if: matrix.os == 'windows-2019'
|
||||||
|
env:
|
||||||
|
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
|
||||||
|
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
|
||||||
working-directory: ${{ github.workspace }}/build
|
working-directory: ${{ github.workspace }}/build
|
||||||
run: cpack -G NSIS
|
run: |
|
||||||
|
# Decode the certificate
|
||||||
|
echo "$BUILD_CERTIFICATE_BASE64" | base64 -d > certificate.p12
|
||||||
|
# Sign all .exe and .dll files in the specified folder
|
||||||
|
for file in OrcaSlicer/*; do
|
||||||
|
if [[ $file == *.exe ]] || [[ $file == *.dll ]]; then
|
||||||
|
"C:/Program Files (x86)/Microsoft SDKs/ClickOnce/SignTool/signtool.exe/signtool.exe" sign /fd sha256 /f certificate.p12 /p $P12_PASSWORD "$file"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
cpack -G NSIS
|
||||||
|
"C:/Program Files (x86)/Microsoft SDKs/ClickOnce/SignTool/signtool.exe/signtool.exe" sign /fd sha256 /f certificate.p12 /p $P12_PASSWORD "${{ github.workspace }}/build/OrcaSlicer_Windows_Installer_${{ env.ver }}.exe"
|
||||||
|
|
||||||
# - name: pack app
|
# - name: pack app
|
||||||
# if: matrix.os == 'windows-2019'
|
# if: matrix.os == 'windows-2019'
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,8 @@
|
||||||
#include "NotificationManager.hpp"
|
#include "NotificationManager.hpp"
|
||||||
#include "format.hpp"
|
#include "format.hpp"
|
||||||
|
|
||||||
|
#include <slic3r/GUI/GUI_Utils.hpp>
|
||||||
|
|
||||||
#if ENABLE_RETINA_GL
|
#if ENABLE_RETINA_GL
|
||||||
#include "slic3r/Utils/RetinaHelper.hpp"
|
#include "slic3r/Utils/RetinaHelper.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -2029,7 +2031,11 @@ void GLCanvas3D::render(bool only_init)
|
||||||
float right_margin = SLIDER_DEFAULT_RIGHT_MARGIN;
|
float right_margin = SLIDER_DEFAULT_RIGHT_MARGIN;
|
||||||
float bottom_margin = SLIDER_DEFAULT_BOTTOM_MARGIN;
|
float bottom_margin = SLIDER_DEFAULT_BOTTOM_MARGIN;
|
||||||
if (m_canvas_type == ECanvasType::CanvasPreview) {
|
if (m_canvas_type == ECanvasType::CanvasPreview) {
|
||||||
const float scale_factor = get_scale();
|
float scale_factor = get_scale();
|
||||||
|
#ifdef WIN32
|
||||||
|
int dpi = get_dpi_for_window(wxGetApp().GetTopWindow());
|
||||||
|
scale_factor *= (float) dpi / (float) DPI_DEFAULT;
|
||||||
|
#endif // WIN32
|
||||||
right_margin = SLIDER_RIGHT_MARGIN * scale_factor * GCODE_VIEWER_SLIDER_SCALE;
|
right_margin = SLIDER_RIGHT_MARGIN * scale_factor * GCODE_VIEWER_SLIDER_SCALE;
|
||||||
bottom_margin = SLIDER_BOTTOM_MARGIN * scale_factor * GCODE_VIEWER_SLIDER_SCALE;
|
bottom_margin = SLIDER_BOTTOM_MARGIN * scale_factor * GCODE_VIEWER_SLIDER_SCALE;
|
||||||
}
|
}
|
||||||
|
|
@ -6873,7 +6879,6 @@ void GLCanvas3D::_render_objects(GLVolumeCollection::ERenderType type, bool with
|
||||||
//BBS: GUI refactor: add canvas size as parameters
|
//BBS: GUI refactor: add canvas size as parameters
|
||||||
void GLCanvas3D::_render_gcode(int canvas_width, int canvas_height)
|
void GLCanvas3D::_render_gcode(int canvas_width, int canvas_height)
|
||||||
{
|
{
|
||||||
float scale_factor = get_scale() * GCODE_VIEWER_SLIDER_SCALE;
|
|
||||||
m_gcode_viewer.render(canvas_width, canvas_height, SLIDER_RIGHT_MARGIN * GCODE_VIEWER_SLIDER_SCALE);
|
m_gcode_viewer.render(canvas_width, canvas_height, SLIDER_RIGHT_MARGIN * GCODE_VIEWER_SLIDER_SCALE);
|
||||||
IMSlider *layers_slider = m_gcode_viewer.get_layers_slider();
|
IMSlider *layers_slider = m_gcode_viewer.get_layers_slider();
|
||||||
IMSlider *moves_slider = m_gcode_viewer.get_moves_slider();
|
IMSlider *moves_slider = m_gcode_viewer.get_moves_slider();
|
||||||
|
|
@ -6946,7 +6951,11 @@ void GLCanvas3D::_check_and_update_toolbar_icon_scale()
|
||||||
if (wxGetApp().plater()->is_preview_shown()) {
|
if (wxGetApp().plater()->is_preview_shown()) {
|
||||||
IMSlider *m_layers_slider = get_gcode_viewer().get_layers_slider();
|
IMSlider *m_layers_slider = get_gcode_viewer().get_layers_slider();
|
||||||
IMSlider *m_moves_slider = get_gcode_viewer().get_moves_slider();
|
IMSlider *m_moves_slider = get_gcode_viewer().get_moves_slider();
|
||||||
const float sc = get_scale();
|
float sc = get_scale();
|
||||||
|
#ifdef WIN32
|
||||||
|
int dpi = get_dpi_for_window(wxGetApp().GetTopWindow());
|
||||||
|
sc *= (float) dpi / (float) DPI_DEFAULT;
|
||||||
|
#endif // WIN32
|
||||||
|
|
||||||
m_layers_slider->set_scale(sc * GCODE_VIEWER_SLIDER_SCALE);
|
m_layers_slider->set_scale(sc * GCODE_VIEWER_SLIDER_SCALE);
|
||||||
m_moves_slider->set_scale(sc * GCODE_VIEWER_SLIDER_SCALE);
|
m_moves_slider->set_scale(sc * GCODE_VIEWER_SLIDER_SCALE);
|
||||||
|
|
|
||||||
|
|
@ -498,6 +498,8 @@ public:
|
||||||
|
|
||||||
bool load_image(const std::string& filename, wxImage &image);
|
bool load_image(const std::string& filename, wxImage &image);
|
||||||
bool generate_image(const std::string &filename, wxImage &image, wxSize img_size, int method = GERNERATE_IMAGE_RESIZE);
|
bool generate_image(const std::string &filename, wxImage &image, wxSize img_size, int method = GERNERATE_IMAGE_RESIZE);
|
||||||
|
int get_dpi_for_window(const wxWindow *window);
|
||||||
|
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue