linux - 是否可以在键盘绑定 gtk.css 文件中使用“if-then-else”语句?
问题描述
这里是否可以单独使用箭头键在 Linux 上的 Eclipse 中的包资源管理器中展开树节点?我找到了改变 Eclipse 中树视图行为的好主意。我想改进它,但我不知道该怎么做,因为我在 gtk.css 配置文件中找不到使用 if-then-else 语句的示例。
我在https://developer.gnome.org/gtk3/stable/GtkTreeView.html#GtkTreeView-select-cursor-的参考文献中找到了两种方法“test-collapse-row”和“test-expand-row”行来测试当前行是否可扩展。我试图找到一个具有 css 键绑定条件的示例,但尚未找到。
@binding-set MyTreeViewBinding
{
bind "Left" { "select-cursor-parent" ()
"expand-collapse-cursor-row" (0,0,0) };
/* I've try code below instead code above - isn't work
bind "Left" { if ("test-expand-row" ())
"expand-collapse-cursor-row" (0,0,0)
else
"select-cursor-parent" () }; */
bind "Right" { "expand-collapse-cursor-row" (0,1,0) };
}
treeview
{
-gtk-key-bindings: MyTreeViewBinding;
}
我需要它是否节点,并且它没有折叠折叠它,但如果它不是节点或它已经折叠,则设置指向父级的指针,但不要折叠它。
解决方案
推荐阅读
- apache-spark - 如何处理 Spark 窗口函数中的数据倾斜?
- reactjs - react-jsonschema-form 的多列支持
- grails - Grails - 如何创建第二个公共域控制器
- c# - C# 替代嵌套有序字典?
- javascript - 使用 Vue.js 在选择输入中设置默认选定项
- google-apps-script - 在 Google 表格的侧边栏中对索引进行排序
- reactjs - 更新状态/上下文以重定向到受保护的路由反应
- c++ - 简化多项式
- azure - Azure ARM - 自定义脚本扩展 - 随机失败
- sql - SQL 错误:ORA-00917:缺少逗号 00917。00000 -“缺少逗号” *原因:*操作: