Removing the Sharpen Effect.

The effect has been known to cause some problems for quite some time
and is not really useful. Therfore dropping the effect.
See discussion on kwin mailinglist:
http://lists.kde.org/?l=kwin&m=129597766829618&w=2
This commit is contained in:
Martin Gräßlin 2011-01-29 14:11:53 +01:00
parent 3e42ddc2cc
commit debb747797
11 changed files with 0 additions and 543 deletions

View file

@ -107,7 +107,6 @@ if( KWIN_HAVE_OPENGL_COMPOSITING )
include( wobblywindows/CMakeLists.txt )
endif( KWIN_HAVE_OPENGL_COMPOSITING )
if( KWIN_HAVE_OPENGL_COMPOSITING AND NOT KWIN_HAVE_OPENGLES_COMPOSITING )
include( sharpen/CMakeLists.txt )
include( snow/CMakeLists.txt )
endif( KWIN_HAVE_OPENGL_COMPOSITING AND NOT KWIN_HAVE_OPENGLES_COMPOSITING )

View file

@ -52,7 +52,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "trackmouse/trackmouse_config.h"
#include "wobblywindows/wobblywindows_config.h"
#ifndef KWIN_HAVE_OPENGLES
#include "sharpen/sharpen_config.h"
#include "snow/snow_config.h"
#endif
#endif
@ -94,7 +93,6 @@ KWIN_EFFECT_CONFIG_MULTIPLE( builtins,
KWIN_EFFECT_CONFIG_SINGLE( trackmouse, TrackMouseEffectConfig )
KWIN_EFFECT_CONFIG_SINGLE( wobblywindows, WobblyWindowsEffectConfig )
#ifndef KWIN_HAVE_OPENGLES
KWIN_EFFECT_CONFIG_SINGLE( sharpen, SharpenEffectConfig )
KWIN_EFFECT_CONFIG_SINGLE( snow, SnowEffectConfig )
#endif
#endif

View file

@ -1,31 +0,0 @@
#######################################
# Effect
# Source files
set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
sharpen/sharpen.cpp
)
# .desktop files
install( FILES
sharpen/sharpen.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
# Data files
install( FILES
sharpen/data/sharpen.frag
sharpen/data/sharpen.vert
DESTINATION ${DATA_INSTALL_DIR}/kwin )
#######################################
# Config
# Source files
set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources}
sharpen/sharpen_config.cpp
)
# .desktop files
install( FILES
sharpen/sharpen_config.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/kwin )

View file

@ -1,24 +0,0 @@
uniform sampler2D sceneTex;
uniform float textureWidth;
uniform float textureHeight;
// Converts pixel coordinates to texture coordinates
vec2 pix2tex(vec2 pix)
{
return vec2(pix.x / textureWidth, 1.0 - pix.y / textureHeight);
}
void main()
{
float amount = 0.4;
vec3 tex = texture2D(sceneTex, pix2tex(gl_TexCoord[0].xy)).rgb * (1.0 + 4.0 * amount);
tex -= texture2D(sceneTex, pix2tex(gl_TexCoord[0].xy + vec2(0.0, 1.0))).rgb * amount;
tex -= texture2D(sceneTex, pix2tex(gl_TexCoord[0].xy + vec2(0.0, -1.0))).rgb * amount;
tex -= texture2D(sceneTex, pix2tex(gl_TexCoord[0].xy + vec2(1.0, 0.0))).rgb * amount;
tex -= texture2D(sceneTex, pix2tex(gl_TexCoord[0].xy + vec2(-1.0, 0.0))).rgb * amount;
gl_FragColor = vec4(tex, 1.0);
}

View file

@ -1,6 +0,0 @@
void main()
{
gl_TexCoord[0].xy = gl_Vertex.xy;
gl_Position = ftransform();
}

View file

@ -1,52 +0,0 @@
/********************************************************************
KWin - the KDE window manager
This file is part of the KDE project.
Copyright (C) 2007 Rivo Laks <rivolaks@hot.ee>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#include "sharpen.h"
#include <kactioncollection.h>
#include <kaction.h>
#include <klocale.h>
namespace KWin
{
KWIN_EFFECT( sharpen, SharpenEffect )
KWIN_EFFECT_SUPPORTED( sharpen, ShaderEffect::supported() )
SharpenEffect::SharpenEffect() : QObject(), ShaderEffect("sharpen")
{
KActionCollection* actionCollection = new KActionCollection( this );
KAction* a = (KAction*)actionCollection->addAction( "Sharpen" );
a->setText( i18nc("@action Enables/Disables an effect that makes windows more sharp", "Toggle Sharpen Effect" ));
a->setGlobalShortcut(KShortcut(Qt::CTRL + Qt::META + Qt::Key_S));
connect(a, SIGNAL(triggered(bool)), this, SLOT(toggle()));
}
void SharpenEffect::toggle()
{
setEnabled( !isEnabled());
}
} // namespace
#include "sharpen.moc"

View file

@ -1,157 +0,0 @@
[Desktop Entry]
Name=Sharpen
Name[af]=Verskerp
Name[ar]=اشحذ
Name[ast]=Agudizáu
Name[bg]=Отчетливост
Name[ca]=Aguditza
Name[ca@valencia]=Aguditza
Name[cs]=Zaostření
Name[csb]=Wëòstrzëc
Name[da]=Gør skarpere
Name[de]=Schärfen
Name[el]=Όξυνση
Name[en_GB]=Sharpen
Name[eo]=Akrigi
Name[es]=Agudizado
Name[et]=Teravdus
Name[eu]=Enfokatu
Name[fa]=تیز کردن
Name[fi]=Terävöitä
Name[fr]=Accentuation de la netteté
Name[fy]=Skerpje
Name[ga]=Géaraigh
Name[gl]=Focalización
Name[gu]=
Name[he]=חידוד
Name[hi]=
Name[hne]=ि
Name[hr]=Izoštrivanje
Name[hu]=Élesítés
Name[ia]=Face plus acute
Name[id]=Pertajam
Name[is]=Skerpa
Name[it]=Nitidezza
Name[ja]=
Name[kk]=Айықындату
Name[km]=
Name[kn]=ಿ ()
Name[ko]=
Name[lt]=Paaštrinimas
Name[lv]=Asināt
Name[mai]=
Name[mk]=Изострување
Name[ml]=
Name[mr]=
Name[nb]=Skjerpe
Name[nds]=Scharp maken
Name[ne]=ि
Name[nl]=Verscherpen
Name[nn]=Oppskarping
Name[pa]=
Name[pl]=Wyostrzenie
Name[pt]=Afiamento
Name[pt_BR]=Nitidez
Name[ro]=Ascute
Name[ru]=Увеличение чёткости
Name[se]=Basttálmuhte
Name[si]=
Name[sk]=Zaostriť
Name[sl]=Izostritev
Name[sr]=Изоштравање
Name[sr@ijekavian]=Изоштравање
Name[sr@ijekavianlatin]=Izoštravanje
Name[sr@latin]=Izoštravanje
Name[sv]=Skärpa
Name[ta]=
Name[te]=
Name[tg]=Четкость
Name[th]=
Name[tr]=Keskinleştir
Name[uk]=Збільшити різкість
Name[uz]=Oʻtkirlash
Name[uz@cyrillic]=Ўткирлаш
Name[wa]=Rawijhî
Name[x-test]=xxSharpenxx
Name[zh_CN]=
Name[zh_TW]=
Comment=Make the entire desktop look sharper
Comment[ar]=يعطي كامل سطح المكتب شكلا حادا
Comment[ast]=Agudizal 'escritoriu
Comment[bg]=Прави работния плот по-отчетлив
Comment[ca]=Fa que tot l'escriptori sembli més definit
Comment[ca@valencia]=Fa que tot l'escriptori parega més definit
Comment[cs]=Zaostří celou vaši plochu
Comment[csb]=Sprôwiô to, że pùlt wëzdrzi barżi òstro
Comment[da]=Får hele skrivebordet til at se skarpere ud
Comment[de]=Lässt Ihre Arbeitsfläche schärfer erscheinen.
Comment[el]=Κάνει την επιφάνεια εργασίας σας να δείχνει πιο οξεία
Comment[en_GB]=Make the entire desktop look sharper
Comment[eo]=Akrigas la tutan labortablon
Comment[es]=Agudiza su escritorio
Comment[et]=Muudab töölaua välimuse teravamaks
Comment[eu]=Zure mahaiagain osoa enfokatzen du
Comment[fi]=Tee koko työpöydästä terävämmän näköinen
Comment[fr]=Fait apparaître l'ensemble du bureau plus nettement
Comment[fy]=Makket jo buroblêd ekstra dúdlik
Comment[ga]=Géaraigh dealramh na deisce
Comment[gl]=Fai que o escritorio aparente estar máis focalizado
Comment[gu]=
Comment[he]=חידוד מראה שולחן העבודה
Comment[hi]=
Comment[hne]= ि
Comment[hr]=Izoštrivanje izgleda cijele radne površine
Comment[hu]=Élesebbé teszi a kontúrokat az asztalon
Comment[ia]=Face le integre scriptorio semblante plus acute
Comment[id]=BUat seluruh desktop tampak lebih tajam
Comment[is]=Lætur skjáborðið sýnast skarpara
Comment[it]=Rende tutto il desktop più nitido
Comment[ja]=
Comment[kk]=Үстеліңіздің көрінісін айқындатады
Comment[km]=
Comment[kn]= ಿ
Comment[ko]=
Comment[lt]=Paaštrina darbastalį
Comment[lv]=Liek jūsu darbvirsmai izskatīties asākai
Comment[mk]=Ја прави целата работна површина да изгледа поизострено
Comment[ml]=ി ിി
Comment[mr]=
Comment[nb]=Får hele skrivebordet til å se skarpere ut
Comment[nds]=Dien Schriefdisch wat scharper utsehn laten
Comment[nl]=Maakt het uiterlijk van de hele desktop scherper
Comment[nn]=Få skrivebordet til å sjå skarpare ut
Comment[pa]= ਿ
Comment[pl]=Sprawia, że pulpit wygląda bardziej ostro
Comment[pt]=Tornar o seu ecrã mais definido
Comment[pt_BR]=Deixa sua área de trabalho mais nítida
Comment[ro]=Face întregul birou să arate mai ascuțit
Comment[ru]=Увеличение чёткости рабочего стола
Comment[si]=
Comment[sk]=Zaostrí celú plochu
Comment[sl]=Celotno namizje izgleda bolj ostro
Comment[sr]=Да цела површ изгледа изоштреније
Comment[sr@ijekavian]=Да цијела површ изгледа изоштреније
Comment[sr@ijekavianlatin]=Da cijela površ izgleda izoštrenije
Comment[sr@latin]=Da cela površ izgleda izoštrenije
Comment[sv]=Gör att hela skrivbordet ser skarpare ut
Comment[ta]=Make the entire desktop look sharper
Comment[tg]=Муҳити мизи кории GNOME
Comment[th]=
Comment[tr]=Masaüstünüzü keskinleştirir
Comment[uk]=Надання кольорам вашої стільниці більшої різкості
Comment[x-test]=xxMake the entire desktop look sharperxx
Comment[zh_CN]=使
Comment[zh_TW]=
Icon=preferences-system-windows-effect-sharpen
Type=Service
X-KDE-ServiceTypes=KWin/Effect
X-KDE-PluginInfo-Author=Rivo Laks
X-KDE-PluginInfo-Email=rivolaks@hot.ee
X-KDE-PluginInfo-Name=kwin4_effect_sharpen
X-KDE-PluginInfo-Version=0.1.0
X-KDE-PluginInfo-Category=Accessibility
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=false
X-KDE-Library=kwin4_effect_builtins

View file

@ -1,44 +0,0 @@
/********************************************************************
KWin - the KDE window manager
This file is part of the KDE project.
Copyright (C) 2007 Rivo Laks <rivolaks@hot.ee>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#ifndef KWIN_SHARPEN_H
#define KWIN_SHARPEN_H
#include <kwinshadereffect.h>
namespace KWin
{
/**
* Sharpens the whole desktop
**/
class SharpenEffect : public QObject, public ShaderEffect
{
Q_OBJECT
public:
SharpenEffect();
public slots:
void toggle();
};
} // namespace
#endif

View file

@ -1,93 +0,0 @@
/********************************************************************
KWin - the KDE window manager
This file is part of the KDE project.
Copyright (C) 2007 Rivo Laks <rivolaks@hot.ee>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#include "sharpen_config.h"
#include <kwineffects.h>
#include <klocale.h>
#include <kdebug.h>
#include <KActionCollection>
#include <kaction.h>
#include <KShortcutsEditor>
#include <QVBoxLayout>
namespace KWin
{
KWIN_EFFECT_CONFIG_FACTORY
SharpenEffectConfig::SharpenEffectConfig(QWidget* parent, const QVariantList& args) :
KCModule(EffectFactory::componentData(), parent, args)
{
QVBoxLayout* layout = new QVBoxLayout(this);
// Shortcut config. The shortcut belongs to the component "kwin"!
KActionCollection *actionCollection = new KActionCollection( this, KComponentData("kwin") );
KAction* a = static_cast<KAction*>(actionCollection->addAction( "Sharpen" ));
a->setText( i18nc("@action Enables/Disables an effect that makes windows more sharp", "Toggle Sharpen Effect" ));
a->setProperty("isConfigurationAction", true);
a->setGlobalShortcut(KShortcut(Qt::CTRL + Qt::META + Qt::Key_S));
mShortcutEditor = new KShortcutsEditor(actionCollection, this,
KShortcutsEditor::GlobalAction, KShortcutsEditor::LetterShortcutsDisallowed);
connect(mShortcutEditor, SIGNAL(keyChange()), this, SLOT(changed()));
layout->addWidget(mShortcutEditor);
layout->addStretch();
load();
}
SharpenEffectConfig::~SharpenEffectConfig()
{
// Undo (only) unsaved changes to global key shortcuts
mShortcutEditor->undoChanges();
}
void SharpenEffectConfig::load()
{
KCModule::load();
emit changed(false);
}
void SharpenEffectConfig::save()
{
KCModule::save();
mShortcutEditor->save(); // undo() will restore to this state from now on
emit changed(false);
EffectsHandler::sendReloadMessage( "sharpen" );
}
void SharpenEffectConfig::defaults()
{
mShortcutEditor->allDefault();
emit changed(true);
}
} // namespace
#include "sharpen_config.moc"

View file

@ -1,84 +0,0 @@
[Desktop Entry]
Type=Service
X-KDE-ServiceTypes=KCModule
X-KDE-Library=kcm_kwin4_effect_builtins
X-KDE-ParentComponents=kwin4_effect_sharpen
X-KDE-PluginKeyword=sharpen
Name=Sharpen
Name[af]=Verskerp
Name[ar]=اشحذ
Name[ast]=Agudizáu
Name[bg]=Отчетливост
Name[ca]=Aguditza
Name[ca@valencia]=Aguditza
Name[cs]=Zaostření
Name[csb]=Wëòstrzëc
Name[da]=Gør skarpere
Name[de]=Schärfen
Name[el]=Όξυνση
Name[en_GB]=Sharpen
Name[eo]=Akrigi
Name[es]=Agudizado
Name[et]=Teravdus
Name[eu]=Enfokatu
Name[fa]=تیز کردن
Name[fi]=Terävöitä
Name[fr]=Accentuation de la netteté
Name[fy]=Skerpje
Name[ga]=Géaraigh
Name[gl]=Focalización
Name[gu]=
Name[he]=חידוד
Name[hi]=
Name[hne]=ि
Name[hr]=Izoštrivanje
Name[hu]=Élesítés
Name[ia]=Face plus acute
Name[id]=Pertajam
Name[is]=Skerpa
Name[it]=Nitidezza
Name[ja]=
Name[kk]=Айықындату
Name[km]=
Name[kn]=ಿ ()
Name[ko]=
Name[lt]=Paaštrinimas
Name[lv]=Asināt
Name[mai]=
Name[mk]=Изострување
Name[ml]=
Name[mr]=
Name[nb]=Skjerpe
Name[nds]=Scharp maken
Name[ne]=ि
Name[nl]=Verscherpen
Name[nn]=Oppskarping
Name[pa]=
Name[pl]=Wyostrzenie
Name[pt]=Afiamento
Name[pt_BR]=Nitidez
Name[ro]=Ascute
Name[ru]=Увеличение чёткости
Name[se]=Basttálmuhte
Name[si]=
Name[sk]=Zaostriť
Name[sl]=Izostritev
Name[sr]=Изоштравање
Name[sr@ijekavian]=Изоштравање
Name[sr@ijekavianlatin]=Izoštravanje
Name[sr@latin]=Izoštravanje
Name[sv]=Skärpa
Name[ta]=
Name[te]=
Name[tg]=Четкость
Name[th]=
Name[tr]=Keskinleştir
Name[uk]=Збільшити різкість
Name[uz]=Oʻtkirlash
Name[uz@cyrillic]=Ўткирлаш
Name[wa]=Rawijhî
Name[x-test]=xxSharpenxx
Name[zh_CN]=
Name[zh_TW]=

View file

@ -1,49 +0,0 @@
/********************************************************************
KWin - the KDE window manager
This file is part of the KDE project.
Copyright (C) 2007 Rivo Laks <rivolaks@hot.ee>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#ifndef KWIN_SHARPEN_CONFIG_H
#define KWIN_SHARPEN_CONFIG_H
#include <kcmodule.h>
class KShortcutsEditor;
namespace KWin
{
class SharpenEffectConfig : public KCModule
{
Q_OBJECT
public:
explicit SharpenEffectConfig(QWidget* parent = 0, const QVariantList& args = QVariantList());
~SharpenEffectConfig();
public slots:
virtual void save();
virtual void load();
virtual void defaults();
private:
KShortcutsEditor* mShortcutEditor;
};
} // namespace
#endif