rsuu / rmg

Rust: Tiny And Fast Manga/Image Viewer
Apache License 2.0
20 stars 0 forks source link

config.rs的Keymap和Window未生效 #3

Closed SchneeHertz closed 1 year ago

SchneeHertz commented 1 year ago

我修改位于AppData\Roaming\rmg的config文件中Base的部分,可以正常反应在软件上,比如反转鼠标滚轮,调整窗口大小等 但修改Keymap的按键映射,Window的边框设置均不生效

fn main() {
    Base {
        size: (1440, 2040),    // width AND height
        font: None,          //
        rename_pad: 6,       //
        invert_mouse: true, //
        filter: "Lanczos3",  // [Box, Hamming, Lanczos3, CatmullRom, Mitchell]
        step: 4,             //
    };

    Keymap {
        up: 'k',
        down: 'n',
        left: 'h',
        right: 'l',
        exit: 'q',
    };

    Window {
        borderless: false,
        topmost: true,
        resize: true,
        none: false,
    }
}
rsuu commented 1 year ago

borderless的话可能需要里自己编译一下代码做测试,我测试不了(你在 WindowOptions 里加个 borderless: true, 然后编译试试看)

https://github.com/emoon/rust_minifb/blob/master/examples/topmost.rs

keymap这一块过几天我再看看吧,最近感冒了

SchneeHertz commented 1 year ago

borderless的话可能需要里自己编译一下代码做测试,我测试不了(你在 WindowOptions 里加个 borderless: true, 然后编译试试看)

https://github.com/emoon/rust_minifb/blob/master/examples/topmost.rs

keymap这一块过几天我再看看吧,最近感冒了

borderless用命令行参数是可以的,只是配置文件不行

rsuu commented 1 year ago

我配置文件写错了 需要更新一下