Skip to content

Commit

Permalink
Add option to disable combo box zoom-in scaling (#2362)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions <[email protected]>
  • Loading branch information
webfiltered and github-actions authored Jan 27, 2025
1 parent 0e1ae41 commit e3ab0e4
Show file tree
Hide file tree
Showing 14 changed files with 38 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/components/graph/GraphCanvas.vue
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,12 @@ watch(
}
)
watchEffect(() => {
LiteGraph.context_menu_scaling = settingStore.get(
'LiteGraph.ContextMenu.Scaling'
)
})
usePragmaticDroppable(() => canvasRef.value, {
getDropEffect: (args): Exclude<DataTransfer['dropEffect'], 'none'> =>
args.source.data.type === 'tree-explorer-node' ? 'copy' : 'move',
Expand Down
7 changes: 7 additions & 0 deletions src/constants/coreSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -715,5 +715,12 @@ export const CORE_SETTINGS: SettingParams[] = [
type: 'hidden',
defaultValue: false,
versionAdded: '1.8.7'
},
{
id: 'LiteGraph.ContextMenu.Scaling',
name: 'Scale node combo widget menus (lists) when zoomed in',
defaultValue: false,
type: 'boolean',
versionAdded: '1.8.8'
}
]
3 changes: 2 additions & 1 deletion src/locales/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,8 @@
"Server-Config": "Server-Config",
"About": "About",
"EditTokenWeight": "Edit Token Weight",
"CustomColorPalettes": "Custom Color Palettes"
"CustomColorPalettes": "Custom Color Palettes",
"ContextMenu": "Context Menu"
},
"serverConfigItems": {
"listen": {
Expand Down
3 changes: 3 additions & 0 deletions src/locales/en/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,9 @@
"name": "Maxium FPS",
"tooltip": "The maximum frames per second that the canvas is allowed to render. Caps GPU usage at the cost of smoothness. If 0, the screen refresh rate is used. Default: 0"
},
"LiteGraph_ContextMenu_Scaling": {
"name": "Scale node combo widget menus (lists) when zoomed in"
},
"pysssss_SnapToGrid": {
"name": "Always snap to grid"
}
Expand Down
1 change: 1 addition & 0 deletions src/locales/fr/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@
"ColorPalette": "Palette de Couleurs",
"Comfy": "Confort",
"Comfy-Desktop": "Comfy-Desktop",
"ContextMenu": "Menu Contextuel",
"CustomColorPalettes": "Palettes de Couleurs Personnalisées",
"DevMode": "Mode Développeur",
"EditTokenWeight": "Modifier le Poids du Jeton",
Expand Down
3 changes: 3 additions & 0 deletions src/locales/fr/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,9 @@
"name": "FPS maximum",
"tooltip": "Le nombre maximum d'images par seconde que le canevas est autorisé à rendre. Limite l'utilisation du GPU au détriment de la fluidité. Si 0, le taux de rafraîchissement de l'écran est utilisé. Par défaut : 0"
},
"LiteGraph_ContextMenu_Scaling": {
"name": "Mise à l'échelle des menus de widgets combinés de nœuds (listes) lors du zoom"
},
"pysssss_SnapToGrid": {
"name": "Toujours aligner sur la grille"
}
Expand Down
1 change: 1 addition & 0 deletions src/locales/ja/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@
"ColorPalette": "カラーパレット",
"Comfy": "Comfy",
"Comfy-Desktop": "Comfyデスクトップ",
"ContextMenu": "コンテキストメニュー",
"CustomColorPalettes": "カスタムカラーパレット",
"DevMode": "開発モード",
"EditTokenWeight": "トークンの重みを編集",
Expand Down
3 changes: 3 additions & 0 deletions src/locales/ja/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,9 @@
"name": "最大FPS",
"tooltip": "キャンバスがレンダリングできる最大フレーム数です。スムーズさの代わりにGPU使用量を制限します。0の場合、画面のリフレッシュレートが使用されます。デフォルト:0"
},
"LiteGraph_ContextMenu_Scaling": {
"name": "ズームイン時にノードコンボウィジェットメニュー(リスト)をスケーリングする"
},
"pysssss_SnapToGrid": {
"name": "常にグリッドにスナップ"
}
Expand Down
1 change: 1 addition & 0 deletions src/locales/ko/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@
"ColorPalette": "색상 팔레트",
"Comfy": "Comfy",
"Comfy-Desktop": "Comfy-Desktop",
"ContextMenu": "컨텍스트 메뉴",
"CustomColorPalettes": "사용자 정의 색상 팔레트",
"DevMode": "개발자 모드",
"EditTokenWeight": "토큰 가중치 편집",
Expand Down
3 changes: 3 additions & 0 deletions src/locales/ko/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,9 @@
"name": "최대 FPS",
"tooltip": "캔버스가 렌더링할 수 있는 최대 프레임 수입니다. 부드럽게 동작하도록 GPU 사용률을 제한 합니다. 0이면 화면 주사율로 작동 합니다. 기본값: 0"
},
"LiteGraph_ContextMenu_Scaling": {
"name": "확대시 노드 콤보 위젯 메뉴 (목록) 스케일링"
},
"pysssss_SnapToGrid": {
"name": "항상 그리드에 스냅"
}
Expand Down
1 change: 1 addition & 0 deletions src/locales/ru/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@
"ColorPalette": "Цветовая палитра",
"Comfy": "Comfy",
"Comfy-Desktop": "Десктопный Comfy",
"ContextMenu": "Контекстное меню",
"CustomColorPalettes": "Пользовательские цветовые палитры",
"DevMode": "Режим разработчика",
"EditTokenWeight": "Редактировать вес токена",
Expand Down
3 changes: 3 additions & 0 deletions src/locales/ru/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,9 @@
"name": "Максимум FPS",
"tooltip": "Максимальное количество кадров в секунду, которое холст может рендерить. Ограничивает использование GPU за счёт плавности. Если 0, используется частота обновления экрана. По умолчанию: 0"
},
"LiteGraph_ContextMenu_Scaling": {
"name": "Масштабирование комбинированных виджетов меню узлов (списков) при увеличении"
},
"pysssss_SnapToGrid": {
"name": "Всегда привязываться к сетке"
}
Expand Down
1 change: 1 addition & 0 deletions src/locales/zh/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@
"ColorPalette": "色彩主题",
"Comfy": "Comfy",
"Comfy-Desktop": "Comfy桌面版",
"ContextMenu": "上下文菜单",
"CustomColorPalettes": "自定义色彩主题",
"DevMode": "开发模式",
"EditTokenWeight": "编辑令牌权重",
Expand Down
3 changes: 3 additions & 0 deletions src/locales/zh/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,9 @@
"name": "最大FPS",
"tooltip": "画布允许渲染的最大帧数。限制GPU使用以换取流畅度。如果为0,则使用屏幕刷新率。默认值:0"
},
"LiteGraph_ContextMenu_Scaling": {
"name": "放大时缩放节点组合部件菜单(列表)"
},
"pysssss_SnapToGrid": {
"name": "始终吸附到网格"
}
Expand Down

0 comments on commit e3ab0e4

Please sign in to comment.